/* --- V2 CYBERPUNK ANIMATIONS --- */
@keyframes cyber-entrance {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: brightness(0.5) blur(4px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1) blur(0); }
}

@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 40%, transparent); }
    50% { box-shadow: 0 0 25px color-mix(in srgb, var(--primary) 70%, transparent), 0 0 5px var(--primary); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Base Body Setup */
body.gaming-theme {
    --bg-page: #08080b; /* Even darker */
    --bg-surface: #121218;
    --bg-surface-hover: #1a1a23;
    --bg-input: #15151c;
    --border: #222230;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    background-color: var(--bg-page);
    color: var(--text-main);
    overflow-x: hidden;
}

/* 2. Glassmorphism Top Navigation */
.gaming-theme .top-header {
    background: rgba(8, 8, 11, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}
.gaming-theme .top-nav a {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em; /* Wider spacing */
    font-size: 0.85rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.gaming-theme .top-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
    box-shadow: 0 0 10px var(--primary);
}
.gaming-theme .top-nav a:hover,
.gaming-theme .top-nav a.active {
    color: #fff;
    text-shadow: 0 0 15px color-mix(in srgb, var(--primary) 60%, transparent);
}
.gaming-theme .top-nav a:hover::after,
.gaming-theme .top-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 3. Cyberpunk Geometry Cards */
.gaming-theme .card, 
.gaming-theme .summary-card,
.gaming-theme .stat-card {
    background: linear-gradient(145deg, var(--bg-surface) 0%, #0a0a0e 100%);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.05); /* Top highlight */
    color: var(--text-main);
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%); /* Cut bottom-right corner */
    position: relative;
}

/* 4. Storefront Product Cards (Game Cases) */
.gaming-theme .product-card {
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(10,10,15,0.9) 100%) !important;
    border: 1px solid var(--border) !important;
    border-bottom: none !important; /* Bottom edge handled by glow */
    border-radius: 0 !important;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    position: relative;
    overflow: hidden !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease !important;
    animation: cyber-entrance 0.6s cubic-bezier(0.2, 1, 0.3, 1) both;
}

/* Stagger entrance animations for grid items */
.gaming-theme .product-card:nth-child(1) { animation-delay: 0.1s; }
.gaming-theme .product-card:nth-child(2) { animation-delay: 0.15s; }
.gaming-theme .product-card:nth-child(3) { animation-delay: 0.2s; }
.gaming-theme .product-card:nth-child(4) { animation-delay: 0.25s; }
.gaming-theme .product-card:nth-child(5) { animation-delay: 0.3s; }
.gaming-theme .product-card:nth-child(6) { animation-delay: 0.35s; }

/* Inset Glowing Border pseudo-element */
.gaming-theme .product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary), transparent 40%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
    pointer-events: none;
}

.gaming-theme .product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 20px color-mix(in srgb, var(--primary) 15%, transparent) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.gaming-theme .product-card:hover::before {
    opacity: 1; /* Reveal border glow */
}

.gaming-theme .product-img {
    border-bottom: 1px solid var(--border) !important;
    background: #000;
    transition: filter 0.5s ease;
}
.gaming-theme .product-card:hover .product-img {
    filter: brightness(1.2) contrast(1.1);
}

.gaming-theme .product-title {
    color: #fff !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}
.gaming-theme .product-price {
    color: var(--primary) !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    text-shadow: 0 0 20px color-mix(in srgb, var(--primary) 40%, transparent);
    font-family: inherit;
}

/* 5. Cyberpunk Neon Buttons */
.gaming-theme .btn-primary {
    background: transparent !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    border-radius: 0 !important;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 10%, transparent), inset 0 0 10px color-mix(in srgb, var(--primary) 10%, transparent) !important;
}
/* Fill pseudo element */
.gaming-theme .btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.gaming-theme .btn-primary:not([disabled]):hover {
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 60%, transparent), inset 0 0 15px color-mix(in srgb, var(--primary) 80%, white) !important;
    transform: translateY(-2px) !important;
    text-shadow: 0 0 5px #fff;
}
.gaming-theme .btn-primary:not([disabled]):hover::after {
    opacity: 0.8;
}

.gaming-theme .btn-outline {
    border-color: var(--border) !important;
    color: var(--text-main) !important;
    background: rgba(0,0,0,0.3) !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.gaming-theme .btn-outline:hover {
    background: var(--bg-surface-hover) !important;
    border-color: var(--text-muted) !important;
}

/* 6. Inputs & Forms */
.gaming-theme input, 
.gaming-theme select, 
.gaming-theme textarea {
    background: rgba(20,20,30,0.5) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0 !important; /* Sharp corners */
    color: var(--text-main) !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}
.gaming-theme input:focus, 
.gaming-theme select:focus, 
.gaming-theme textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary) 20%, transparent), inset 0 0 5px color-mix(in srgb, var(--primary) 20%, transparent) !important;
    background: rgba(20,20,30,0.8) !important;
}
.gaming-theme .form-label {
    color: var(--text-muted) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* 7. Tables */
.gaming-theme table {
    color: var(--text-main);
}
.gaming-theme th {
    background: rgba(0,0,0,0.4) !important;
    color: var(--primary) !important;
    border-bottom: 1px solid var(--border) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 800;
}
.gaming-theme td {
    border-bottom: 1px solid rgba(255,255,255,0.02) !important;
}
.gaming-theme tr:hover td {
    background: rgba(255,255,255,0.02) !important;
}

/* 8. Auth Centered Layout (Login/Register) */
.gaming-theme.auth-layout {
    background: url('../img/auth_bg.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}
.gaming-theme.auth-layout::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 8, 12, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 0;
}
.gaming-theme .auth-container {
    position: relative;
    z-index: 1;
    animation: cyber-entrance 0.8s cubic-bezier(0.2, 1, 0.3, 1) both;
}
.gaming-theme .auth-card {
    background: linear-gradient(135deg, rgba(20, 20, 26, 0.85) 0%, rgba(10, 10, 14, 0.95) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.05) !important;
    border-top: 1px solid rgba(255,255,255,0.15) !important; /* Hard top light */
    border-radius: 0 !important;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9), 0 0 20px color-mix(in srgb, var(--primary) 30%, transparent) !important;
}

/* 9. Hero Banner */
.gaming-hero {
    position: relative;
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    padding: 70px 50px;
    margin-bottom: 40px;
    background: url('../img/store_hero_bg.png') center center / cover no-repeat;
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    animation: cyber-entrance 0.8s cubic-bezier(0.2, 1, 0.3, 1) both;
}
.gaming-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0.4) 60%, transparent 100%);
    z-index: 1;
}
.gaming-hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}
.gaming-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px color-mix(in srgb, var(--primary) 70%, transparent);
}
.gaming-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 500;
}
