:root {
    --xbox-green: #107C10;
    --xbox-green-hover: #159a15;
    --xbox-green-glow: rgba(16, 124, 16, 0.4);
    --xbox-green-glow-strong: rgba(16, 124, 16, 0.7);
    --bg-dark: #020202;
    --bg-card: #0c0c0c;
    --bg-card-hover: #121212;
    --bg-input: #101010;
    --glass-bg: rgba(15, 15, 15, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #999999;
    --transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    --glow-shadow: 0 0 30px var(--xbox-green-glow);
    
    /* Responsive Spacing */
    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 2rem;
    --space-l: 4rem;
    --space-xl: 8rem;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem);
    padding-top: 30px; /* Reduzido para aproximar conteúdo do topo */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--xbox-green);
    border-radius: 10px;
}

/* Layout Utilities */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--space-m);
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-s);
    }
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-stack {
    display: grid;
    gap: var(--space-m);
}

/* Header & Navigation */
header {
    padding: 1rem 0;
    position: fixed; /* Fixed é mais estável para evitar 'shakes' de layout */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, background;
}

header.scrolled {
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.hero-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 60vw, 650px);
    height: auto;
    opacity: 0.7;
    z-index: 1;
    filter: drop-shadow(0 0 30px var(--xbox-green-glow));
    animation: heroLogoFloat 6s ease-in-out infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

/* Header Adaptive Layout (Flexbox Restored) */
.mobile-nav-row {
    display: contents; /* Dissolve no Desktop */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: clamp(1.2rem, 1.8vw + 0.8rem, 1.8rem);
    font-weight: 800;
    color: var(--xbox-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo span {
    color: white;
}

.search-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 450px;
    margin: 0 1.5rem;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cart-btn-responsive {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.cart-btn-responsive:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--xbox-green);
}

.cart-count {
    background: var(--xbox-green);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 900;
}

.admin-btn-responsive {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.admin-btn-responsive:hover {
    background: var(--xbox-green);
    border-color: var(--xbox-green);
}

@media (max-width: 768px) {
    body {
        padding-top: 40px; /* Reduzido no mobile conforme solicitado */
    }

    .header-container {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
    }

    .search-wrapper {
        order: -1; /* Busca no topo no Celular */
        margin: 0;
        width: 100%;
        max-width: none;
    }

    /* Linha inferior no Mobile com Logo e Ações */
    .mobile-nav-row {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 1.1rem;
    }

    .cart-btn-responsive, .admin-btn-responsive {
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
    }
}

.search-form-responsive {
    display: flex;
    position: relative;
    width: 100%;
}

.search-input-responsive {
    padding: 0.8rem 1.2rem;
    border-radius: 35px;
    width: 100%;
    padding-right: 100px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.search-btn-responsive {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    padding: 0 1.5rem;
    border-radius: 30px;
    font-size: 0.75rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
    font-weight: 800;
    color: var(--xbox-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo span {
    color: white;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Search Bar */
.search-form {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input {
    padding: 0.7rem 1.2rem;
    border-radius: 30px;
    width: 100%;
    padding-right: 100px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    transition: var(--transition);
}

.search-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--xbox-green);
    box-shadow: 0 0 15px var(--xbox-green-glow);
}

.search-btn {
    position: absolute;
    right: 2px;
    top: 2px;
    bottom: 2px;
    padding: 0 1.5rem;
    border-radius: 25px;
    font-size: 0.7rem;
    border: none;
    background: var(--xbox-green);
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .header-right {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        padding: 1rem;
        justify-content: space-around;
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(20px);
        z-index: 1000;
        gap: 10px;
    }
    
    .search-form {
        max-width: none;
    }
    
    .btn-admin {
        display: none; /* Hide admin button in mobile bottom bar, or keep as icon */
    }
}

/* Hero Section */
.hero {
    position: relative;
    margin-bottom: 2rem;
    text-align: center;
    padding: 10rem 2rem;
    overflow: hidden;
    border-radius: 30px;
    background: radial-gradient(circle at center, rgba(16, 124, 16, 0.15), transparent 70%);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw + 1rem, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
    animation: fadeIn 1s ease;
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw + 0.5rem, 1.4rem);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 640px) {
    .game-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .game-card {
        width: 100%;
        max-width: 320px; /* Card com tamanho equilibrado ao centro */
        margin: 0 auto;
    }
    
    .game-info {
        padding: 1.2rem;
    }
    
    .game-card img {
        height: 280px;
    }
    
    .game-title {
        font-size: 1.1rem;
    }
}

.game-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow);
    animation: fadeIn 0.6s ease forwards;
}

.game-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--xbox-green);
    box-shadow: 0 20px 50px rgba(16, 124, 16, 0.2), 0 0 20px var(--xbox-green-glow);
    z-index: 10;
}

.game-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: var(--transition);
}

.game-info {
    padding: 1.5rem;
}

.game-genre {
    font-size: 0.7rem;
    color: var(--xbox-green);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 0.9rem;
}

.btn-premium {
    background: var(--xbox-green);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: none !important;
    outline: none !important;
}

.btn-premium:hover, .glow-btn:hover {
    background: var(--xbox-green-hover);
    box-shadow: 0 15px 30px rgba(16, 124, 16, 0.3), 0 0 20px var(--xbox-green-glow);
    transform: translateY(-2px);
    border: none !important;
}

.glow-btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: none !important;
    outline: none !important;
}

.btn-admin {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.btn-admin:hover {
    background: var(--xbox-green);
    border-color: var(--xbox-green);
}

/* Forms */
.login-box {
    max-width: 450px;
    width: 90%;
    margin: 100px auto;
    background: var(--bg-card);
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

input, textarea, select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--xbox-green);
    box-shadow: 0 0 10px var(--xbox-green-glow);
}

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 1100px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .game-spotlight {
        position: relative !important;
        top: 0 !important;
    }
}

.cart-item-premium {
    background: var(--bg-card);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

@media (max-width: 480px) {
    .cart-item-premium {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .cart-item-thumb {
        width: 100% !important;
        height: 200px !important;
    }
}

.cart-item-thumb {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Dashboard & Admin */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    z-index: 1001;
    transition: var(--transition);
}

.admin-nav {
    list-style: none;
    margin-top: 2rem;
}

.admin-nav li {
    margin-bottom: 0.8rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.admin-nav-link.active {
    background: rgba(16, 124, 16, 0.1);
    color: var(--xbox-green);
    border-color: rgba(16, 124, 16, 0.2);
}

.admin-content {
    margin-left: 280px;
    padding: clamp(3rem, 8vw, 6rem); /* Aumentado padding para mais respiro */
    transition: var(--transition);
    min-height: 100vh;
}

.admin-header {
    position: relative !important; /* Força para não herdar o fixed do header global */
    margin-bottom: 8.5rem !important; /* Aumentado um pouco mais para garantir o respiro */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.admin-header h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -1.5px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--xbox-green);
    box-shadow: 0 15px 40px rgba(16, 124, 16, 0.15);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.dashboard-table th {
    padding: 1.5rem 1.2rem;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-table td {
    padding: 1.5rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1100;
    background: var(--xbox-green);
    border: none;
    color: white;
    padding: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

@media (max-width: 992px) {
    .sidebar-toggle {
        display: block;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        width: 290px;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.9);
    }
    
    .admin-content {
        margin-left: 0;
        padding: 8rem 1.5rem 3rem; /* Aumentado padding topo no mobile */
    }
}

/* Animations */
/* Animations status check status status if successful */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--xbox-green-glow); }
    50% { box-shadow: 0 0 20px var(--xbox-green-glow); }
    100% { box-shadow: 0 0 5px var(--xbox-green-glow); }
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(300px, 80vw, 600px);
    height: 300px;
    background: radial-gradient(circle, var(--xbox-green-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Glass Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}


/* Category Chips */
.category-chip {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--chip-color);
    box-shadow: 0 5px 15px var(--chip-color);
    transform: translateY(-3px);
    color: var(--chip-color) !important;
}

.category-chip.active {
    background: var(--chip-color) !important;
    border-color: var(--chip-color);
    color: white !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--chip-color);
}

.categories-section {
    margin-top: 60px;
    margin-bottom: 4rem;
}

.category-chips-container {
    padding: 20px 0 1rem 0;
    margin-bottom: 1.5rem;
}

.category-chips-container::-webkit-scrollbar {
    display: none;
}

@keyframes chipFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.category-chip {
    animation: chipFadeIn 0.5s ease backwards;
}

.category-chip:nth-child(1) { animation-delay: 0.1s; }
.category-chip:nth-child(2) { animation-delay: 0.2s; }
.category-chip:nth-child(3) { animation-delay: 0.3s; }
.category-chip:nth-child(4) { animation-delay: 0.4s; }
.category-chip:nth-child(5) { animation-delay: 0.5s; }
/* Mobile Spacing Fix */
@media (max-width: 992px) {
    .main-header {
        padding: 0.5rem 0 !important;
    }

    .hero {
        padding: 8rem 1rem 8rem 1rem !important;
        margin-bottom: 0 !important;
    }

    .hero h1 {
        margin-bottom: 1.5rem !important;
        font-size: 2.3rem !important;
    }

    .categories-section {
        margin-top: 10px !important;
        margin-bottom: 2rem !important;
    }

    .category-chips-container {
        padding: 5px 0 5px 0 !important;
        margin-bottom: 0.5rem !important;
        gap: 0.5rem !important;
    }

    .category-chip {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.7rem !important;
    }
}
/* Premium Video Player Details */
.video-premium-container {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(16, 124, 16, 0.2);
    transition: var(--transition);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.video-premium-container:hover {
    border-color: var(--xbox-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 124, 16, 0.2), 0 0 20px var(--xbox-green-glow);
}

.video-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.video-header i {
    color: var(--xbox-green);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px var(--xbox-green-glow));
}

.video-header span {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: white;
}

.video-frame-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-glow-soft {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 124, 16, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
