:root {
    --bg-base: #050A10;
    --bg-surface: #0B1320;
    --bg-card: #0F192A;
    --teal: #00F0FF;
    --teal-dark: #008F99;
    --emerald: #00FF9D;
    --emerald-dark: #00995E;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --glow-teal: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.2);
    --glow-emerald: 0 0 15px rgba(0, 255, 157, 0.4), 0 0 30px rgba(0, 255, 157, 0.2);
    --danger: #FF3366;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 157, 0.05), transparent 25%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--emerald);
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.5);
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* --- Header --- */
.site-header {
    background: rgba(11, 19, 32, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 5px;
    background: linear-gradient(90deg, var(--teal), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    letter-spacing: 0.5px;
}

/* --- Buttons (3D Futuristic) --- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--teal), var(--emerald));
    color: #000 !important;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.5),
        var(--glow-teal);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 8px 15px rgba(0, 0, 0, 0.6),
        var(--glow-emerald);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.button:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(0, 0, 0, 0.5);
}

.button.button-outline {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--teal);
    color: var(--teal) !important;
    box-shadow: 
        inset 0 0 10px rgba(0, 240, 255, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.5);
}

.button.button-outline:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--emerald);
    color: var(--emerald) !important;
    box-shadow: 
        inset 0 0 15px rgba(0, 255, 157, 0.2),
        var(--glow-emerald);
}

.button.small {
    padding: 8px 16px;
    font-size: 0.75rem;
}

.button.btn-danger {
    background: rgba(255, 51, 102, 0.05);
    border: 1px solid var(--danger);
    color: var(--danger) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.button.btn-danger:hover {
    background: rgba(255, 51, 102, 0.15);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
    border-color: #FF6688;
    color: #FF6688 !important;
}

/* --- Grid List (Index) --- */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
    padding: 60px 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 
        inset 0 1px 1px rgba(255,255,255,0.05),
        0 10px 30px rgba(0,0,0,0.8);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--emerald));
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 255, 157, 0.4);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.9),
        0 0 20px rgba(0, 240, 255, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card .cover {
    height: 380px;
    overflow: hidden;
    background: #000;
    position: relative;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.card:hover .cover img {
    transform: scale(1.08);
    opacity: 1;
}

.placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-style: italic;
    background: repeating-linear-gradient(45deg, rgba(0, 240, 255, 0.03), rgba(0, 240, 255, 0.03) 10px, transparent 10px, transparent 20px);
}

.card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--white);
}

.meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.meta strong {
    color: var(--teal);
    font-weight: 500;
}

.synopsis {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    text-align: center;
}

/* --- Detail Page --- */
.detail-page {
    padding: 60px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        inset 0 1px 2px rgba(255,255,255,0.05),
        0 30px 60px rgba(0,0,0,0.8),
        0 0 30px rgba(0, 255, 157, 0.05);
    position: relative;
    overflow: hidden;
}

.detail-layout::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.detail-cover {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.9);
    border: 1px solid rgba(0, 255, 157, 0.2);
    position: relative;
    z-index: 2;
}

.detail-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    position: relative;
    z-index: 2;
}

.detail-info h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    line-height: 1.3;
    background: linear-gradient(135deg, #FFF, var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.detail-author {
    font-size: 1.1rem;
    color: var(--emerald);
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(5, 10, 16, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 500;
}

.detail-synopsis {
    font-size: 1rem;
    line-height: 1.8;
    color: #CBD5E1;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
}

/* --- Admin Pages --- */
.admin-page {
    padding: 50px 0;
}

.admin-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 
        inset 0 1px 1px rgba(255,255,255,0.05),
        0 20px 50px rgba(0,0,0,0.6);
    max-width: 900px;
    margin: 0 auto;
}

.form-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    color: var(--emerald);
    margin: 30px 0 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.form-section-title:first-child {
    margin-top: 0;
}

.form-row {
    margin-bottom: 25px;
}

.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-row label span {
    color: var(--danger);
    margin-left: 4px;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(5, 10, 16, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.5),
        0 0 10px rgba(0, 255, 157, 0.2);
}

.form-row input[type="file"] {
    background: rgba(5, 10, 16, 0.8);
    padding: 12px;
    border: 1px dashed rgba(0, 240, 255, 0.4);
    border-radius: 8px;
    width: 100%;
    color: var(--text-muted);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.current-file {
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--teal);
    background: rgba(0, 240, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    display: inline-block;
}

.form-actions {
    margin-top: 40px;
    text-align: right;
}

/* --- Admin Table --- */
.admin-panel {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: rgba(5, 10, 16, 0.9);
    color: var(--teal);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    white-space: nowrap;
}

.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.05);
    vertical-align: middle;
    font-size: 0.9rem;
}

.admin-table tbody tr {
    transition: background 0.3s;
}

.admin-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.03);
}

.table-cover {
    width: 50px;
    height: 70px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.table-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    display: block;
    text-align: center;
    line-height: 70px;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.font-bold {
    font-weight: 600;
    color: var(--white);
}

.link-input {
    width: 100%;
    min-width: 180px;
    padding: 8px 12px;
    background: rgba(5, 10, 16, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.link-input:focus {
    outline: none;
    border-color: var(--emerald);
    color: var(--emerald);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* --- Misc --- */
.notice {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: 500;
    background: rgba(255, 51, 102, 0.1);
    color: #FF88AA;
    border: 1px solid rgba(255, 51, 102, 0.3);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.1);
}

.notice.success {
    background: rgba(0, 255, 157, 0.1);
    color: #66FFC2;
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.1);
}

.empty-state {
    padding: 80px 20px;
    text-align: center;
    color: var(--teal);
    font-size: 1.1rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px dashed rgba(0, 240, 255, 0.3);
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.05);
}

.text-center {
    text-align: center;
}

.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    margin-top: 40px;
    letter-spacing: 0.5px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .detail-cover {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .form-row-group {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .admin-table thead {
        display: none;
    }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
        display: block;
        width: 100%;
    }
    .admin-table tr {
        margin-bottom: 20px;
        border: 1px solid rgba(0, 240, 255, 0.2);
        border-radius: 12px;
        background: rgba(5, 10, 16, 0.6);
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.05), 0 5px 15px rgba(0,0,0,0.5);
    }
    .admin-table td {
        text-align: right;
        padding: 15px 15px 15px 40%;
        position: relative;
        border-bottom: 1px solid rgba(0, 240, 255, 0.05);
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .admin-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 35%;
        text-align: left;
        font-weight: 600;
        color: var(--teal);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    .table-cover {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-buttons {
        display: flex;
        width: 100%;
        gap: 10px;
    }
    
    .header-buttons .button {
        flex: 1;
        padding: 10px;
        font-size: 0.75rem;
        text-align: center;
    }
    
    .site-header h1 {
        font-size: 1.6rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}
