@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #08080c;
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.18);
    --text: #ffffff;
    --text-dim: rgba(255,255,255,0.4);
    --text-muted: rgba(255,255,255,0.18);
    --accent: #6C63FF;
    --accent2: #00D4AA;
    --danger: #ff4757;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --shadow: 0 4px 24px rgba(0,0,0,0.45);
    --transition: 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

body {
    background: var(--bg);
    min-height: 100vh;
    font-family: var(--font);
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; outline: none; border: none; }
input, textarea, select { font-family: inherit; outline: none; border: none; }

.ad-side {
    position: fixed; top: 0; bottom: 0;
    width: 80px;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.ad-side-left { left: 0; }
.ad-side-right { right: 0; }
.ad-side .ad-placeholder-text {
    writing-mode: vertical-rl;
    height: 200px;
    font-size: 0.55rem;
    letter-spacing: 2px;
}
@media (max-width: 1300px) { .ad-side { width: 30px; } .ad-side .ad-placeholder-text { font-size: 0.45rem; height: 100px; } }
@media (max-width: 900px) { .ad-side { display: none; } }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--r-xl);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.btn:active { transform: translateY(0); box-shadow: none; }

.btn-accent {
    background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(0,212,170,0.18));
    border-color: rgba(108,99,255,0.22);
    font-weight: 600;
}
.btn-accent:hover {
    background: linear-gradient(135deg, rgba(108,99,255,0.28), rgba(0,212,170,0.28));
    border-color: rgba(108,99,255,0.45);
    box-shadow: 0 0 24px rgba(108,99,255,0.15), 0 6px 0 rgba(108,99,255,0.06);
    transform: translateY(-3px);
}
.btn-accent:active { transform: translateY(1px); }

.btn-danger {
    background: rgba(255,71,87,0.1);
    border-color: rgba(255,71,87,0.2);
}
.btn-danger:hover {
    background: rgba(255,71,87,0.18);
    border-color: rgba(255,71,87,0.4);
    box-shadow: 0 0 20px rgba(255,71,87,0.12);
    transform: translateY(-3px);
}
.btn-danger:active { transform: translateY(1px); }

.btn-sm {
    padding: 5px 12px;
    font-size: 0.7rem;
    border-radius: var(--r-md);
}


.search-section {
    position: relative; z-index: 2;
    display: flex; justify-content: center;
    padding: 16px 20px 0;
    animation: fadeDown 0.5s ease;
}
.search-wrap {
    position: relative;
    width: 100%;
    max-width: 900px;
}
.search-input {
    width: 100%;
    height: 54px;
    padding: 0 54px 0 48px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: 0.3s;
}
.search-input::placeholder { color: rgba(255,255,255,0.16); }
.search-input:focus {
    border-color: rgba(108,99,255,0.25);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 40px rgba(108,99,255,0.06);
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.16;
    transition: opacity 0.3s;
}
.search-icon svg { display: block; width: 20px; height: 20px; }
.search-input:focus ~ .search-icon { opacity: 0.4; }


.ad-banner-top, .ad-banner-bottom {
    position: relative; z-index: 1;
    max-width: 1400px;
    margin: 10px auto 0;
    padding: 0 24px;
}
.ad-banner-bottom {
    margin: 0 auto 14px;
}
.ad-placeholder-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.015);
    border: 1px dashed rgba(255,255,255,0.05);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}


.cards-section {
    position: relative; z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 22px 24px 40px;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    aspect-ratio: 2 / 3;
    border-radius: var(--r-lg);
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.3s,
                box-shadow 0.3s;
    cursor: default;
    animation: cardIn 0.5s ease both;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108,99,255,0.12);
    box-shadow: 0 12px 40px rgba(108,99,255,0.08);
}
body.admin-active .game-card:hover {
    transform: translateY(-2px);
}

.game-card:nth-child(1) { animation-delay: 0.02s; }
.game-card:nth-child(2) { animation-delay: 0.05s; }
.game-card:nth-child(3) { animation-delay: 0.08s; }
.game-card:nth-child(4) { animation-delay: 0.11s; }
.game-card:nth-child(5) { animation-delay: 0.14s; }
.game-card:nth-child(6) { animation-delay: 0.17s; }
.game-card:nth-child(7) { animation-delay: 0.20s; }
.game-card:nth-child(8) { animation-delay: 0.23s; }
.game-card:nth-child(9) { animation-delay: 0.26s; }
.game-card:nth-child(10) { animation-delay: 0.29s; }
.game-card:nth-child(11) { animation-delay: 0.32s; }
.game-card:nth-child(12) { animation-delay: 0.35s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        transparent 18%,
        rgba(0,0,0,0.15) 38%,
        rgba(0,0,0,0.82) 65%,
        rgba(0,0,0,0.96) 100%
    );
    pointer-events: none;
    z-index: 1;
}


.genre-tag {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.52rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    color: rgba(255,255,255,0.5);
    pointer-events: none;
    line-height: 1;
    height: auto;
}


.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 16px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 1px 10px rgba(0,0,0,0.7);
    letter-spacing: -0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.card-ver, .card-plat {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 3px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(4px);
    line-height: 1.4;
    color: rgba(255,255,255,0.5);
}

.card-ver {
    color: rgba(0,212,170,0.7);
    border-color: rgba(0,212,170,0.1);
}

.card-plat {
    color: rgba(108,99,255,0.7);
    border-color: rgba(108,99,255,0.1);
}

.card-pub {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.3);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 0.7rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.5);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    margin-top: 2px;
}

.card-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 6px;
}

.card-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(0,212,170,0.18));
    border: 1px solid rgba(108,99,255,0.14);
    transition: 0.2s;
    text-decoration: none;
    line-height: 1;
}
.card-dl-btn:hover {
    background: linear-gradient(135deg, rgba(108,99,255,0.28), rgba(0,212,170,0.28));
    border-color: rgba(108,99,255,0.3);
    color: #fff;
}
.card-dl-btn svg {
    display: block;
    flex-shrink: 0;
}


.admin-card-ctrl {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 5;
    display: none;
    gap: 3px;
}
body.admin-active .admin-card-ctrl { display: flex; }

.ctrl-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.5);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s;
    padding: 0;
    line-height: 0;
}
.ctrl-btn:hover {
    background: rgba(0,0,0,0.65);
    color: #fff;
}
.ctrl-btn-danger:hover {
    background: rgba(255,71,87,0.2);
    border-color: rgba(255,71,87,0.3);
    color: var(--danger);
}


.pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 28px;
    padding-bottom: 20px;
}
.pagination.visible { display: flex; }

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--r-sm);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-btn:hover:not(.active):not(:disabled) {
    border-color: rgba(108,99,255,0.2);
    background: rgba(108,99,255,0.06);
    color: #fff;
}
.page-btn.active {
    background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(0,212,170,0.2));
    border-color: rgba(108,99,255,0.2);
    color: #fff;
    cursor: default;
}
.page-btn:disabled {
    opacity: 0.2;
    cursor: default;
}
.page-dots {
    color: var(--text-muted);
    padding: 0 3px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    user-select: none;
}


.admin-trigger {
    position: fixed; bottom: 12px; right: 12px;
    width: 32px; height: 32px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    z-index: 5;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-trigger::after {
    content: '⚙';
    font-size: 14px;
    opacity: 0.15;
    transition: opacity 0.3s;
}
.admin-trigger:hover {
    border-color: rgba(108,99,255,0.15);
    background: rgba(108,99,255,0.05);
}
.admin-trigger:hover::after { opacity: 0.5; }


.fab {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 50;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    font-size: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 12px rgba(108,99,255,0.3);
    line-height: 0;
    padding: 0;
    overflow: hidden;
}
.fab:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.fab:active { transform: scale(0.92); }
body.admin-active .fab { display: flex; animation: fabIn 0.3s ease; }
@keyframes fabIn {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}


.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
    width: 100%;
    max-width: 480px;
    background: rgba(12,12,16,0.98);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--r-lg);
    padding: 28px 24px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.25);
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.modal-close:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
}
.gv-close {
    width: 36px; height: 36px;
    font-size: 17px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}
.form-row-3 .form-group {
    flex: 1;
}

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.form-group textarea { min-height: 68px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: rgba(108,99,255,0.28);
    background: rgba(255,255,255,0.06);
}
.form-group select { appearance: none; cursor: pointer; }
.form-group select option { background: #0c0c10; color: #fff; }
.form-actions {
    display: flex; gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.image-upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.image-upload-row .file-input-wrap {
    position: relative;
    flex: 1;
}
.image-upload-row .file-input-wrap input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    z-index: 2;
}
.image-upload-row .file-input-wrap .file-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.08);
    transition: var(--transition);
    cursor: pointer;
}
.image-upload-row .file-input-wrap .file-label:hover {
    border-color: rgba(108,99,255,0.22);
    background: rgba(108,99,255,0.04);
    color: rgba(255,255,255,0.55);
}
.image-upload-row .file-label.has-file {
    border-color: rgba(0,212,170,0.25);
    color: var(--accent2);
}
.image-upload-row .or-divider {
    color: rgba(255,255,255,0.12);
    font-size: 0.72rem;
    flex-shrink: 0;
}
.image-upload-row input[type="url"] { flex: 1; }

.upload-progress {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.upload-progress.active { display: flex; }
.upload-progress .spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.05);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


.password-prompt {
    position: fixed; inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
}
.password-prompt.open { display: flex; }

.password-box {
    background: rgba(12,12,16,0.98);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--r-lg);
    padding: 30px 26px 26px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    animation: modalIn 0.3s ease;
}
.password-box h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.password-box p {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 18px;
}
.password-box input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--r-md);
    font-size: 1.3rem;
    text-align: center;
    letter-spacing: 8px;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.password-box input:focus {
    border-color: rgba(108,99,255,0.28);
    background: rgba(255,255,255,0.06);
}
.password-box .error {
    color: var(--danger);
    font-size: 0.7rem;
    margin-top: 8px;
    display: none;
}
.password-box .error.show { display: block; }
.password-box .btn { margin-top: 14px; width: 100%; }


.batch-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
    padding: 16px;
}
.batch-overlay.open { display: flex; }

.batch-modal {
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    background: rgba(10,10,14,0.98);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    animation: modalIn 0.3s ease;
    overflow: hidden;
}

.batch-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 12px;
    flex-shrink: 0;
}
.batch-modal-header h2 {
    font-size: 1rem;
    font-weight: 700;
}

.batch-top {
    padding: 0 22px 14px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.batch-count-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.batch-count-row label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}
.batch-count-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.batch-count-wrap input {
    width: 70px;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}
.batch-count-wrap input:focus {
    border-color: rgba(108,99,255,0.28);
    background: rgba(255,255,255,0.06);
}

.batch-autofill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
}
.af-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.af-cb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-dim);
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
    user-select: none;
}
.af-cb:hover {
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}
.af-cb input {
    appearance: none;
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}
.af-cb input:checked {
    background: linear-gradient(135deg, rgba(108,99,255,0.5), rgba(0,212,170,0.5));
    border-color: rgba(108,99,255,0.4);
}
.af-cb input:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.af-cb input:focus {
    border-color: rgba(108,99,255,0.3);
}

.batch-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 22px;
    min-height: 0;
}
.batch-body::-webkit-scrollbar { width: 4px; }
.batch-body::-webkit-scrollbar-track { background: transparent; }
.batch-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
}

.batch-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--r-md);
    border: 1px solid rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.012);
    cursor: pointer;
    transition: var(--transition);
}
.b-slot:hover {
    border-color: rgba(108,99,255,0.15);
    background: rgba(108,99,255,0.03);
    transform: translateX(3px);
}

.bs-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.bs-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 24px;
    flex-shrink: 0;
}
.bs-title {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bs-title.empty {
    color: var(--text-muted);
    font-style: italic;
}

.bs-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.bs-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}
.bs-status.filled {
    border-color: rgba(0,212,170,0.3);
    background: rgba(0,212,170,0.08);
    color: var(--accent2);
}
.bs-edit {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-dim);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
}
.b-slot:hover .bs-edit {
    color: rgba(255,255,255,0.7);
    border-color: rgba(108,99,255,0.15);
    background: rgba(108,99,255,0.05);
}

.batch-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px 16px;
    border-top: 1px solid rgba(255,255,255,0.03);
    flex-shrink: 0;
}


.cd-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 210;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    align-items: center; justify-content: center;
    padding: 20px;
}
.cd-overlay.open { display: flex; }

.cd-modal {
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: rgba(10,10,14,0.98);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    animation: modalIn 0.3s ease;
    overflow: hidden;
}

.cd-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cd-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cd-top-left .btn { font-size: 0.65rem; padding: 4px 10px; }
.cd-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.cd-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.cd-scroll::-webkit-scrollbar { width: 4px; }
.cd-scroll::-webkit-scrollbar-track { background: transparent; }
.cd-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
}


.cd-hero {
    width: 100%;
    aspect-ratio: 2.8 / 1;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}
.cd-hero-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}
.cd-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        transparent 20%,
        rgba(0,0,0,0.25) 50%,
        rgba(0,0,0,0.82) 80%,
        rgba(10,10,14,0.98) 100%
    );
    pointer-events: none;
    z-index: 1;
}
.cd-hero-content {
    position: relative;
    z-index: 2;
    padding: 20px 24px 22px;
    width: 100%;
}
.cd-hero-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.cd-hero-tag {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.4;
}
.cd-hero-genre {
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
}
.cd-hero-ver {
    background: rgba(0,212,170,0.08);
    border: 1px solid rgba(0,212,170,0.12);
    color: var(--accent2);
}
.cd-hero-plat {
    background: rgba(108,99,255,0.08);
    border: 1px solid rgba(108,99,255,0.12);
    color: var(--accent);
}
.cd-hero-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.6);
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.cd-hero-pub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 1px;
}


.cd-page {
    padding: 18px 24px 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cd-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.cd-field-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.cd-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cd-field-1 { flex: 1; }
.cd-field-2 { flex: 2; }
.cd-field-3 { flex: 3; }
.cd-field-full { flex: 1; width: 100%; }

.cd-field label {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cd-inp {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}
.cd-inp:focus {
    border-color: rgba(108,99,255,0.22);
    background: rgba(255,255,255,0.05);
}
.cd-inp::placeholder {
    color: rgba(255,255,255,0.08);
}
.cd-inp.cd-af {
    background: rgba(108,99,255,0.06);
    border-color: rgba(108,99,255,0.1);
    box-shadow: inset 0 0 0 1px rgba(108,99,255,0.06);
}
.cd-inp.cd-view {
    background: transparent;
    border-color: transparent;
    color: rgba(255,255,255,0.8);
    cursor: default;
    padding-left: 0;
    resize: none;
}
.cd-inp.cd-view:focus {
    border-color: transparent;
    background: transparent;
}
.cd-inp.cd-view::placeholder {
    color: transparent;
}
textarea.cd-inp {
    min-height: 90px;
    resize: vertical;
    line-height: 1.55;
}

.cd-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0 14px;
    border-top: 1px solid rgba(255,255,255,0.03);
    margin-top: 2px;
}


.no-results {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 10px;
}
.no-results.visible { display: flex; animation: fadeIn 0.3s ease; }
.no-results h3 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
}


.gv-page {
    display: none;
    position: fixed; inset: 0;
    z-index: 50;
    background: var(--bg);
    flex-direction: column;
    overflow: hidden;
}
.gv-page.active { display: flex; }

.gv-top {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.gv-top .btn { font-size: 0.75rem; padding: 6px 16px; }

.gv-body {
    flex: 1;
    display: flex;
    gap: 0;
    min-height: 0;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.gv-poster {
    flex: 0 0 35%;
    position: relative;
    overflow: hidden;
}
.gv-poster-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}
.gv-poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 50%, rgba(10,10,14,1) 100%);
    pointer-events: none;
}

.gv-info {
    flex: 1;
    padding: 18px 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.gv-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.gv-tag {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.3;
}
.gv-tag-genre {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
}
.gv-tag-ver {
    background: rgba(0,212,170,0.08);
    border: 1px solid rgba(0,212,170,0.12);
    color: var(--accent2);
}
.gv-tag-plat {
    background: rgba(108,99,255,0.08);
    border: 1px solid rgba(108,99,255,0.12);
    color: var(--accent);
}

.gv-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-metas {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 4px;
}
.gv-meta {
    display: flex;
    gap: 8px;
    font-size: 0.72rem;
}
.gv-meta-l {
    color: var(--text-dim);
    min-width: 90px;
    flex-shrink: 0;
}
.gv-meta-v {
    color: rgba(255,255,255,0.65);
}

.gv-desc {
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.45);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    flex: 1;
    min-height: 0;
}

.gv-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(0,212,170,0.2));
    border: 1px solid rgba(108,99,255,0.15);
    transition: var(--transition);
    text-decoration: none;
    align-self: flex-start;
    margin-top: 2px;
}
.gv-dl:hover {
    background: linear-gradient(135deg, rgba(108,99,255,0.3), rgba(0,212,170,0.3));
    border-color: rgba(108,99,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108,99,255,0.12);
}
.gv-dl svg { display: block; flex-shrink: 0; }

.gv-ad-inline {
    flex-shrink: 0;
    margin: 2px 0;
}
.gv-ad-inline .ad-placeholder-text {
    height: 36px;
    border-radius: 4px;
}
.gv-ad-bot {
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding: 10px 20px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}
.gv-ad-bot .ad-placeholder-text {
    height: 80px;
    border-radius: var(--r-md);
}


@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 1100px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 640px) {
    .cards-grid { grid-template-columns: 1fr; gap: 14px; }
    .cards-section { padding: 16px 12px 24px; }
    .search-section { padding: 12px 12px 0; }
    .search-input { height: 46px; font-size: 14px; padding: 0 42px 0 40px; }
    .search-icon { left: 14px; }
    .search-icon svg { width: 18px; height: 18px; }
    .header { padding: 8px 14px; min-height: 38px; }
    .fab { bottom: 14px; right: 14px; width: 26px; height: 26px; font-size: 13px; }
    .admin-trigger { bottom: 10px; right: 10px; width: 26px; height: 26px; }
    .modal { padding: 22px 16px 18px; }
    .image-upload-row { flex-direction: column; }
    .image-upload-row .or-divider { display: none; }
    .pagination { gap: 3px; }
    .page-btn { min-width: 30px; height: 30px; font-size: 0.7rem; padding: 0 6px; }

    .batch-modal { max-height: 85vh; }
    .batch-modal-header { padding: 14px 14px 8px; }
    .batch-top { padding: 0 14px 10px; }
    .batch-body { padding: 10px 14px; }
    .batch-bottom { padding: 10px 14px 12px; }
    .batch-autofill { gap: 3px 8px; }
    .batch-count-row { flex-wrap: wrap; }
    .form-row { flex-direction: column; gap: 8px; }

    .cd-modal { max-height: 85vh; }
    .cd-topbar { padding: 8px 12px; }
    .cd-page { padding: 12px 14px 6px; gap: 14px; }
    .cd-hero { min-height: 130px; aspect-ratio: auto; }
    .cd-hero-content { padding: 14px 16px 16px; }
    .cd-hero-title { font-size: 1.05rem; }
    .cd-field-row.cd-fr-3 { flex-wrap: wrap; }
    .cd-fr-3 .cd-field { flex: 1 1 100%; }
    .cd-page-actions { padding: 2px 0 10px; }

    .gv-body { flex-direction: column; max-width: 100%; }
    .gv-poster { flex: 0 0 140px; }
    .gv-poster-shade { background: linear-gradient(0deg, transparent 40%, rgba(10,10,14,1) 100%); }
    .gv-info { padding: 12px 16px; gap: 4px; }
    .gv-title { font-size: 1.05rem; }
    .gv-desc { -webkit-line-clamp: 3; font-size: 0.72rem; }
    .gv-metas { gap: 2px; }
    .gv-meta { font-size: 0.65rem; }
    .gv-meta-l { min-width: 70px; }
    .gv-ad-inline .ad-placeholder-text { height: 28px; }
    .gv-ad-bot .ad-placeholder-text { height: 50px; }
    .gv-ad-bot { padding: 6px 12px; }
    .gv-top { padding: 8px 12px; }
    .gv-top .btn { font-size: 0.68rem; padding: 4px 12px; }
    .ad-banner-top, .ad-banner-bottom { padding: 0 12px; }
    .ad-placeholder-text { height: 44px; font-size: 0.55rem; }
}

