:root {
    --bg-dark: #0a0b10;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.5);
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse at 20% 40%, rgba(59, 130, 246, 0.2), transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.25), transparent 40%),
        radial-gradient(ellipse at 50% 90%, rgba(99, 58, 200, 0.15), transparent 40%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
    background-attachment: fixed;
}

header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(10, 11, 16, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-box {
    background: #fff;
    color: #000;
    font-weight: 800;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.logo-text span {
    color: var(--accent-blue);
    text-shadow: 0 0 15px var(--accent-blue-glow);
}

.control-panel {
    display: flex;
    gap: 1rem;
}

.btn-dark {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.btn-dark:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-logout {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: inset 0 0 10px rgba(239,68,68,0.1);
}
.btn-logout:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.hero-section {
    text-align: center;
    padding: 6rem 5% 2rem;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(59, 130, 246, 1), 0 0 60px rgba(139, 92, 246, 0.6), 0 0 100px rgba(59, 130, 246, 0.3);
    background: linear-gradient(to right, #93c5fd, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Hero Feature Cards */
.hero-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 960px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: featureCardIn 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes featureCardIn {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.feature-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(255, 255, 255, 0.06);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon svg {
    transform: scale(1.2);
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.feature-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    letter-spacing: 0.1px;
}

/* --- Feature Card Color Variants --- */

/* Daily Updates - Cyan */
.feature-daily {
    border-color: rgba(6, 182, 212, 0.15);
}
.feature-daily:hover {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}
.feature-daily .feature-icon {
    background: rgba(6, 182, 212, 0.12);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}
.feature-daily .feature-icon svg {
    color: #22d3ee;
}
.feature-daily:hover .feature-icon {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}
.feature-daily .feature-title {
    background: linear-gradient(135deg, #67e8f9, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Multi-Platform - Violet */
.feature-multiplatform {
    border-color: rgba(139, 92, 246, 0.15);
}
.feature-multiplatform:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}
.feature-multiplatform .feature-icon {
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}
.feature-multiplatform .feature-icon svg {
    color: #a78bfa;
}
.feature-multiplatform:hover .feature-icon {
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}
.feature-multiplatform .feature-title {
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* NSwitch CFW - Amber/Orange */
.feature-cfw {
    border-color: rgba(245, 158, 11, 0.15);
}
.feature-cfw:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}
.feature-cfw .feature-icon {
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}
.feature-cfw .feature-icon svg {
    color: #fbbf24;
}
.feature-cfw:hover .feature-icon {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}
.feature-cfw .feature-title {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Safe & Simple - Emerald */
.feature-safe {
    border-color: rgba(16, 185, 129, 0.15);
}
.feature-safe:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}
.feature-safe .feature-icon {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}
.feature-safe .feature-icon svg {
    color: #34d399;
}
.feature-safe:hover .feature-icon {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}
.feature-safe .feature-title {
    background: linear-gradient(135deg, #6ee7b7, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Link Buttons */
.hero-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-link-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.hero-link-btn:hover {
    transform: translateY(-3px) scale(1.04);
}

.hero-link-btn:hover svg {
    transform: scale(1.15);
}

/* WhatsApp */
.hero-link-btn.whatsapp {
    border-color: rgba(37, 211, 102, 0.3);
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.1);
}
.hero-link-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.6);
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.35), 0 8px 20px rgba(0,0,0,0.3);
    color: #25d366;
}

/* Shopee */
.hero-link-btn.shopee {
    border-color: rgba(238, 77, 45, 0.3);
    box-shadow: 0 0 15px rgba(238, 77, 45, 0.1);
}
.hero-link-btn.shopee:hover {
    background: rgba(238, 77, 45, 0.15);
    border-color: rgba(238, 77, 45, 0.6);
    box-shadow: 0 0 25px rgba(238, 77, 45, 0.35), 0 8px 20px rgba(0,0,0,0.3);
    color: #ee4d2d;
}

/* Website */
.hero-link-btn.website {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}
.hero-link-btn.website:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.35), 0 8px 20px rgba(0,0,0,0.3);
    color: #818cf8;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-blue-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-blue-glow);
}

.btn-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

main {
    flex: 1;
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.glass-panel {
    background: rgba(10, 11, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(6, 182, 212, 0.05);
}

.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* Game Cards */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.05);
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
}

.game-cover {
    width: 90px;
    height: 135px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    background: #1e293b;
    flex-shrink: 0;
}

.game-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.game-meta.game-size {
    font-weight: 500;
}

.game-meta.game-size strong {
    color: #fff;
    font-weight: 700;
}

.game-meta svg {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.game-genre-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.game-genre-row svg {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.genre-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.genre-badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 0.2rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.game-actions {
    margin-top: auto;
    text-align: right;
    padding-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.login-container {
    max-width: 400px;
    margin: 4rem auto;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* Form Layout */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-col-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-col-right {
    display: flex;
    flex-direction: column;
}

.upload-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upload-zone {
    flex: 1;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
    min-height: 150px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(59,130,246,0.1);
    color: #fff;
}

/* Genre Pills */
.genre-select-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    min-height: 48px;
    position: relative;
}
.genre-select-container:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dropdown-trigger {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    user-select: none;
}
.dropdown-trigger:hover {
    color: #fff;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.dropdown-menu.show {
    display: block;
}
.dropdown-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 10;
}
#genreDropdownSearch {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
}
#genreDropdownSearch:focus {
    border-color: var(--accent-blue);
}
.dropdown-item {
    padding: 0.8rem 1rem;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}
.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.2);
}
.dropdown-item.selected {
    background: rgba(59, 130, 246, 0.4);
    pointer-events: none;
    opacity: 0.5;
}

.genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    background: var(--accent-blue);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 10px rgba(59,130,246,0.4);
}

.pill-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

/* =======================================
   FOOTER
   ======================================= */
footer {
    text-align: center;
    padding: 2rem 5%;
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 11, 16, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.footer-text a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: #93c5fd;
}

/* =======================================
   MOBILE HAMBURGER MENU
   ======================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px;
    transition: all 0.3s ease;
    z-index: 200;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =======================================
   MOBILE OVERLAY NAV
   ======================================= */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 149;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =======================================
   GAME CARD PRICE / EXTRA META
   ======================================= */
.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* =======================================
   SCROLL TO TOP BUTTON
   ======================================= */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--accent-blue-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px var(--accent-blue-glow);
}

.scroll-top-btn svg {
    width: 22px;
    height: 22px;
}

/* =======================================
   RESPONSIVE BREAKPOINTS
   ======================================= */

/* --- Tablet & Small Desktop (max-width: 992px) --- */
@media (max-width: 992px) {
    main {
        padding: 2rem 4%;
    }

    .hero-section {
        padding: 3.5rem 4% 1.5rem;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.2rem;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 1rem 4%;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100dvh;
        background: rgba(10, 11, 16, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 150;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.open {
        right: 0;
    }

    .mobile-overlay {
        display: block;
    }

    .control-panel {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }

    .control-panel .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
        justify-content: center;
    }

    /* Hero Section */
    .hero-section {
        padding: 2.5rem 5% 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.4rem, 6vw, 2rem);
        margin-bottom: 1rem;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .feature-card {
        padding: 1.2rem 1rem;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
    }

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

    .hero-links {
        gap: 0.8rem;
        margin-top: 1.8rem;
    }

    .hero-link-btn {
        padding: 0.65rem 1.2rem;
        font-size: 0.88rem;
        flex: 1 1 auto;
        min-width: 100px;
        justify-content: center;
    }

    /* Main Content */
    main {
        padding: 1.5rem 4%;
    }

    .glass-panel {
        padding: 1.2rem;
        border-radius: 12px;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    /* Search Bar */
    .search-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem;
    }

    .search-header .search-box {
        width: 100%;
    }

    .search-header .search-box input,
    .search-box input[type="text"] {
        width: 100% !important;
    }

    /* Game Grid — 1 column on mobile */
    .game-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Game Card — vertical layout on mobile */
    .game-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.2rem 1rem;
    }

    .game-cover {
        width: 140px;
        height: 210px;
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    }

    .game-info {
        align-items: center;
        width: 100%;
    }

    .game-title {
        font-size: 1.15rem;
        text-align: center;
    }

    .game-meta {
        justify-content: center;
        font-size: 0.92rem;
    }

    .game-genre-row {
        justify-content: center;
    }

    .genre-badges {
        justify-content: center;
    }

    .game-actions {
        text-align: center;
        width: 100%;
    }

    .game-actions .btn {
        width: 100%;
    }

    /* Form Grid (Admin) */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .upload-zone {
        min-height: 120px;
    }

    /* Login */
    .login-container {
        margin: 2rem auto;
        max-width: 100%;
    }

    /* Footer */
    footer {
        padding: 1.5rem 4%;
    }

    /* Scroll to top */
    .scroll-top-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    header {
        padding: 0.8rem 3%;
    }

    .logo-box {
        font-size: 0.95rem;
        padding: 0.3rem 0.6rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 2rem 4% 1.2rem;
    }

    .hero-title {
        font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .feature-card {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
        gap: 0.8rem;
    }

    .feature-content {
        align-items: flex-start;
    }

    .feature-title {
        font-size: 0.88rem;
    }

    .feature-desc {
        font-size: 0.75rem;
    }

    .feature-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .hero-links {
        flex-direction: column;
        gap: 0.6rem;
    }

    .hero-link-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    main {
        padding: 1rem 3%;
    }

    .glass-panel {
        padding: 1rem;
        border-radius: 10px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .game-card {
        padding: 1rem 0.8rem;
    }

    .game-cover {
        width: 120px;
        height: 180px;
    }

    .game-title {
        font-size: 1.05rem;
    }

    .genre-badge {
        font-size: 0.72rem;
        padding: 0.15rem 0.55rem;
    }

    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.9rem;
    }

    /* Admin search */
    .search-box input[type="text"] {
        width: 100% !important;
        font-size: 0.9rem;
    }

    /* Admin form inputs */
    input[type="text"],
    input[type="password"] {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
}

/* --- Prevent hover effects on touch devices --- */
@media (hover: none) {
    .game-card:hover {
        transform: none;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }

    .hero-link-btn:hover {
        transform: none;
    }

    .game-card:active {
        transform: scale(0.98);
        border-color: rgba(6, 182, 212, 0.4);
        transition: transform 0.15s ease;
    }

    .hero-link-btn:active {
        transform: scale(0.97);
        transition: transform 0.15s ease;
    }
}
