/* --- BIẾN MÀU SẮC (Variables) - PREMIUM THEME --- */
:root {
    --bg-primary: #05090e;
    /* Đen xanh sâu thẳm */
    --bg-secondary: #0f141c;
    --glass-bg: rgba(15, 20, 28, 0.75);
    /* Increased opacity to compensate for less blur */
    --glass-bg-hover: rgba(15, 20, 28, 0.9);
    --primary-accent: #00f0ff;
    /* Cyan Neon */
    --secondary-accent: #7000ff;
    /* Purple Neon */
    --text-primary: #e6f1ff;
    --text-secondary: #94a3b8;
    --border-color: rgba(0, 240, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --vip-color: #ffd700;
    --aurora-1: #00f0ff;
    --aurora-2: #7000ff;
    --aurora-3: #ff0055;
}

/* --- CẤU TRÚC CƠ BẢN --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* --- AURORA BACKGROUND (GPU-optimized: no blur filter) --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.12), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.12), transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(255, 0, 85, 0.04), transparent 45%);
    z-index: -1;
}

#gameList {
    perspective: 1200px;
}

@keyframes auroraMove {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.container {
    padding: 3rem 1.5rem;
    max-width: 1600px;
    margin: auto;
    position: relative;
    z-index: 2;
}

#content-wrapper {
    width: 100%;
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: var(--bg-primary);
    display: grid;
    place-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-accent);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HEADER --- */
.header {
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    min-height: 340px;
    overflow: hidden;
    justify-content: center;
}

.header-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.header h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
    animation: slideDown 0.8s ease-out 0.2s backwards;
}

/* --- ELECTRIC BORDER (no infinite animation) --- */
.electric-border {
    position: relative;
    border: 2px solid var(--primary-accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.electric-text {
    color: #fff;
    text-shadow: 0 0 5px #00f0ff, 0 0 10px #00f0ff, 0 0 20px #00f0ff;
    font-weight: 700;
    letter-spacing: 2px;
}

.header .discord-button {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- NÚT DISCORD --- */
.discord-button {
    display: inline-block;
    margin-top: 2.5rem;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    /* animation pulse-action removed - reduces GPU load */
}

.discord-button:hover,
.discord-button:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.3);
}

/* --- SEARCH & FILTER --- */
#main-view {
    animation: fadeIn 0.5s ease-in-out;
}

.controls-container {
    background-color: rgba(12, 17, 24, 0.95);
    /* backdrop-filter removed - GPU heavy */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    width: 100%;
}

#searchInput {
    width: 100%;
    padding: 16px 24px 16px 54px;
    font-size: 1.1rem;
    border-radius: 14px;
    border: 2px solid var(--primary-accent);
    background: linear-gradient(90deg, #161b22 80%, #58a6ff22 100%);
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 2px 8px #58a6ff22;
}

#searchInput::placeholder {
    color: var(--text-secondary);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.3);
}

.search-container::before {
    content: '🔍';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--primary-accent);
    background: linear-gradient(90deg, #161b22 80%, #58a6ff22 100%);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px #58a6ff22;
}

.filter-btn:hover {
    color: #ffd700;
    border-color: #ffd700;
    background: linear-gradient(90deg, #ffd70022 80%, #58a6ff22 100%);
}

.filter-btn.active {
    background: linear-gradient(90deg, #58a6ff 80%, #ffd700 100%);
    color: #222;
    border-color: #ffd700;
}

/* --- GAME LIST & CARDS --- */
.game-counter {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

#gameList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
    /* Chuẩn bị cho 3D */
}

.game-card {
    background: rgba(15, 20, 28, 0.95);
    /* backdrop-filter removed - GPU heavy */
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out forwards;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Hiệu ứng Glow chạy quanh viền khi Hover (Pseudo-element) */
.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(22, 27, 34, 0.98);
}

.game-card:hover::before {
    opacity: 1;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
}

.game-card.is-vip {
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.game-card.is-vip:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4);
    border-color: var(--vip-color);
}

.game-card.is-plus {
    border: 1px solid rgba(191, 0, 255, 0.3);
    box-shadow: 0 0 15px rgba(191, 0, 255, 0.1);
}

.game-card.is-plus:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(191, 0, 255, 0.4);
    border-color: #bf00ff;
}

/* Badge Styles */
.vip-badge,
.free-badge,
.plus-badge {
    position: absolute;
    top: 15px;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vip-badge {
    right: 15px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.free-badge {
    left: 15px;
    background: linear-gradient(135deg, #00f0ff, #00aaff);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.plus-badge {
    right: 15px;
    background: linear-gradient(135deg, #bf00ff, #ff00cc);
    color: #fff;
    box-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
}

.version-badge {
    position: absolute;
    top: 50px;
    left: 15px;
    background: rgba(5, 9, 14, 0.9);
    color: var(--primary-accent);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    z-index: 3;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.update-time-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.2);
}

.version-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 400;
    text-shadow: none;
}



.game-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.game-card:hover .game-card-image {
    transform: scale(1.03);
}

.game-card h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    transition: color 0.3s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-card:hover h3 {
    color: var(--primary-accent);
    text-shadow: 0 0 10px var(--primary-accent);
}

.game-card.is-vip:hover h3 {
    color: var(--vip-color);
    text-shadow: 0 0 10px var(--vip-color);
}

.mod-author-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: left;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mod-author-note::before {
    content: "🛡️";
    font-size: 0.9rem;
}

.features-wrapper {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.features-wrapper strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.features-list {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Feature tag with "new" keyword */
.feature-tag.is-new-feature {
    background: rgba(255, 0, 85, 0.1) !important;
    border-color: rgba(255, 0, 85, 0.4) !important;
    color: #ff0055 !important;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
    font-weight: 700;
}

.game-card:hover .feature-tag {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--primary-accent);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- DETAIL VIEW REDESIGN --- */
#detail-view {
    display: none;
    position: relative;
    z-index: 100;
}

#detail-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* filter: blur removed - GPU heavy; using opacity only */
    opacity: 0.15;
    z-index: -1;
    transition: opacity 0.5s ease;
}

.detail-container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background: rgba(22, 27, 34, 0.97);
    /* backdrop-filter removed - GPU heavy */
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: zoomIn 0.4s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: #fff;
}

.detail-content {
    background: rgba(22, 27, 34, 0.98);
    /* backdrop-filter removed - GPU heavy */
    box-shadow: 0 12px 48px 0 rgba(88, 166, 255, 0.12), 0 2px 8px 0 rgba(0, 0, 0, 0.25);
    border: 2px solid var(--primary-accent);
    border-radius: 24px;
    padding: clamp(2rem, 6vw, 3rem);
    transition: box-shadow 0.3s, border-color 0.3s;
}

/* --- Căn chỉnh tính năng MOD xuống dòng --- */
.features-list {
    display: flex;
    flex-direction: column;
    /* Quan trọng: ép xuống dòng */
    gap: 3px;
    /* Khoảng cách giữa các phần tử */
    list-style: none;
    padding: 0;
}

#detail-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 12px #58a6ff, 0 0 24px #1f6feb;
    letter-spacing: 2px;
}

#detail-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

#detail-title a:hover {
    color: var(--primary-accent);
}

.video-wrapper {
    max-width: 80%;
    margin: 0 auto 2.5rem auto;
}

#video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid var(--primary-accent);
    box-shadow: 0 0 24px #58a6ff55;
}

#video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#detail-description p {
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 250px;
    overflow-y: auto;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--bg-primary);
}

#detail-features .features-list {
    gap: 0.6rem;
}

#detail-features .feature-tag {
    font-size: 1.05rem;
    padding: 6px 14px;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

#detail-discord-link,
#copy-discord-link {
    flex-grow: 1;
    text-align: center;
    padding: 14px 25px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
    border: 1px solid var(--border-color);
}

#detail-discord-link {
    background-color: var(--primary-accent);
    color: #fff;
}

#detail-discord-link:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-3px);
}

#copy-discord-link {
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
}

#copy-discord-link:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

#download-link {
    background: linear-gradient(90deg, #58a6ff, #ffd700);
    color: #222;
    font-weight: 700;
    border-radius: 12px;
    padding: 14px 28px;
    text-align: center;
    text-decoration: none;
    border: 0;
    box-shadow: 0 4px 16px #58a6ff44;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: none;
}

#download-link.visible {
    display: inline-block;
}

#download-link:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px #ffd70088;
}

/* --- FOOTER & MISC --- */
.footer {
    text-align: center;
    padding: 2.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    display: none;
    place-items: center;
    z-index: 999;
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
    opacity: 0;
    transform: translateY(10px);
}

#scroll-to-top.visible {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

#scroll-to-top:hover {
    background-color: var(--primary-accent);
    color: #fff;
}

@media (max-width: 700px) {
    .container {
        padding: 1.5rem 0.8rem;
    }

    .header {
        padding: 2.5rem 1rem;
        min-height: 280px;
    }

    .header-logo {
        width: 80px;
        height: 80px;
    }

    .header h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .controls-container {
        padding: 1.2rem;
        gap: 1rem;
    }

    .search-container {
        margin-bottom: 1rem;
    }

    #searchInput {
        padding: 12px 16px 12px 42px;
        font-size: 0.95rem;
    }

    .search-container::before {
        left: 14px;
        font-size: 1rem;
    }

    .filter-controls {
        gap: 0.6rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    #gameList {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        perspective: 1000px; /* Base for 3D effect */
    }

    .game-card {
        padding: 0.8rem;
        border-radius: 14px;
    }

    .game-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.8rem;
        line-height: 1.4;
    }

    .mod-author-note {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .features-wrapper {
        padding-top: 0.6rem;
    }

    .features-wrapper strong {
        font-size: 0.7rem;
    }

    .feature-tag {
        padding: 2px 6px;
        font-size: 0.7rem;
        border-radius: 4px;
    }

    .vip-badge,
    .free-badge,
    .plus-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
        top: 8px;
    }

    .vip-badge,
    .plus-badge {
        right: 8px;
    }

    .free-badge {
        left: 8px;
    }

    .video-wrapper {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    #detail-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .detail-container {
        margin: 1rem;
        padding: 1.2rem;
    }

    .detail-content {
        padding: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #policy-modal-backdrop {
        transition: none !important;
    }

    .policy-links a,
    .policy-actions button {
        transition: none !important;
    }

    .policy-links a:hover,
    .policy-actions button:hover {
        transform: none !important;
    }
}

/* --- POLICY MODAL --- */
#policy-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    /* backdrop-filter removed - GPU heavy */
    z-index: 2000;
}

#policy-modal-backdrop.show {
    display: grid;
    place-items: center;
}

#policy-modal {
    width: min(720px, 92vw);
    background: var(--glass-bg, #0d1117);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .45);
    color: var(--text-primary, #e6edf3);
    overflow: hidden;
}

.policy-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-secondary, #0b0f14);
    border-bottom: 1px solid var(--border-color, #30363d);
}

.policy-head h3 {
    font-size: 1.05rem;
    letter-spacing: .5px;
    margin: 0;
}

.policy-lang {
    display: inline-flex;
    gap: 6px;
    background: #00000022;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #30363d);
}

.policy-lang button {
    border: 0;
    background: transparent;
    color: var(--text-secondary, #9da7b3);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.policy-lang button.active {
    background: var(--primary-accent, #238636);
    color: #fff;
}

.policy-body {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.policy-box {
    background: rgba(22, 27, 34, .7);
    border: 1px dashed var(--primary-accent, #238636);
    border-radius: 12px;
    padding: 14px;
}

.policy-box strong {
    color: #ffd700;
}

.policy-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.policy-links a {
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid var(--primary-accent, #238636);
    background: linear-gradient(90deg, #161b22 80%, #58a6ff22 100%);
    color: #fff;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.policy-links a:hover {
    transform: translateY(-2px);
    border-color: #ffd700;
}

.policy-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--border-color, #30363d);
    background: var(--bg-secondary, #0b0f14);
}

.policy-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.policy-actions button {
    border: 1px solid var(--border-color, #30363d);
    background: var(--primary-accent, #238636);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .2s, background-color .2s;
}

.policy-actions button.secondary {
    background: transparent;
    color: var(--text-primary, #e6edf3);
}

.policy-actions button:hover {
    transform: translateY(-1px);
}

.policy-checkbox {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.policy-checkbox input {
    width: 18px;
    height: 18px;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02) !important;
    position: relative;
    overflow: hidden;
}

.skeleton-image, .skeleton-text {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 18px;
    margin-bottom: 0.8rem;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

/* --- TRENDING SECTION --- */
.trending-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-marquee {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 10px 0;
}

.trending-grid {
    display: flex;
    gap: 1.2rem;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.trending-grid:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.trending-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(15, 20, 28, 0.4);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 250px;
    white-space: nowrap;
}

.trending-rank {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dim);
    min-width: 40px;
    text-align: center;
    font-style: italic;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
    z-index: 1;
}

.trending-card:hover .trending-rank {
    color: var(--primary-accent);
    transform: scale(1.3) rotate(-5deg);
    text-shadow: 0 0 15px var(--primary-accent);
}

/* Specific glows for top ranks */
.trending-card:nth-child(1) .trending-rank {
    color: #ffd700;
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    font-size: 2.2rem;
}

.trending-card:nth-child(2) .trending-rank {
    color: #e0e0e0;
    opacity: 1;
    text-shadow: 0 0 15px rgba(224, 224, 224, 0.6);
    font-size: 2rem;
}

.trending-card:nth-child(3) .trending-rank {
    color: #ffa500;
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
    font-size: 1.9rem;
}

/* Other numbers should also be visible */
.trending-rank:not(:nth-child(-n+3)) {
    opacity: 0.6;
    color: var(--primary-accent);
}

.trending-card:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--primary-accent);
    transform: translateX(5px);
}

.trending-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.trending-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.trending-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- COMMENT SYSTEM --- */
.comment-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 12px;
    animation: fadeIn 0.4s ease-out;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.comment-user {
    font-weight: 700;
    color: #fff;
}

.comment-stars {
    color: #ffd700;
    font-size: 0.9rem;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.comment-date {
    font-size: 0.75rem;
    color: #4b5563;
    margin-top: 0.5rem;
    text-align: right;
}

.comment-form {
    background: rgba(15, 20, 28, 0.8);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#comment-name {
    flex: 1;
    min-width: 200px;
    background: #161b22;
    border: 1px solid #30363d;
    padding: 10px 15px;
    border-radius: 8px;
    color: #fff;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: #30363d;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: #ffd700;
}

#comment-text {
    width: 100%;
    height: 100px;
    background: #161b22;
    border: 1px solid #30363d;
    padding: 10px 15px;
    border-radius: 8px;
    color: #fff;
    margin-bottom: 1rem;
    resize: vertical;
}

#btn-submit-comment {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

#btn-submit-comment:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

@media (max-width: 700px) {
    .trending-grid {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
    }

    .star-rating {
        justify-content: flex-end;
    }
}

/* --- MOD REQUEST SECTION --- */
.mod-request-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.mod-request-card {
    background: rgba(15, 20, 28, 0.9);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.request-input-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 650px;
    margin: 0 auto;
}

#request-play-url {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: inherit;
    transition: all 0.3s;
}

#request-play-url:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

#btn-submit-request {
    padding: 10px 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}

#btn-submit-request:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 166, 255, 0.4);
}

#btn-submit-request:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .request-input-wrapper {
        flex-direction: column;
    }
    
    #btn-submit-request {
        width: 100%;
    }
}

/* --- PUSH NOTIFICATIONS --- */
.push-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.push-toast {
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid var(--primary-accent);
    padding: 12px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 320px;
    border-left: 4px solid var(--primary-accent);
}

.push-icon {
    font-size: 1.5rem;
    background: rgba(0, 240, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.push-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-accent);
}

.push-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- PAGINATION --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 240, 255, 0.2);
}

.page-btn.active {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 5px;
}

@media (max-width: 600px) {
    .pagination-container {
        gap: 0.3rem;
    }
    .page-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
        min-width: 38px;
    }
}/* Aura Glow Effect */
#aura-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--glow-color, rgba(0, 240, 255, 0.2)) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    transition: background 0.8s ease;
    display: none;
}

#detail-view[style*="display: block"] ~ #aura-glow {
    display: block;
}

/* Site Updates Widget */
.updates-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid var(--primary-accent);
    border-radius: 16px;
    z-index: 2500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.updates-widget.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.updates-header {
    background: rgba(0, 240, 255, 0.1);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.updates-header h3 {
    font-size: 0.9rem;
    color: var(--primary-accent);
    margin: 0;
}

#close-updates {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
}

.updates-list {
    max-height: 250px;
    overflow-y: auto;
}

.update-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.update-item .time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.update-item .content {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

@media (max-width: 600px) {
    .updates-widget {
        width: 280px;
        bottom: 70px;
        right: 15px;
    }
}
