/* 
  SkinRush Arena - Modern UI Design System
  Inspired by Stake, Duelbits, Rollbit
*/

:root {
    /* Base Colors */
    --bg-main: #030304;        /* Deep Pitch Black */
    --bg-secondary: #0c0c0e;   /* Premium Dark Graphite */
    --bg-tertiary: #141416;    /* Dark Charcoal */
    
    /* Brand Colors */
    --accent-blue: #0070f3;    /* Electric Blue */
    --accent-purple: #7928ca;  /* Deep Purple */
    --accent-glow: rgba(0, 112, 243, 0.3);
    
    /* Functional Colors */
    --success: #00ff88;        /* Gain Green */
    --error: #ff4d4d;          /* Loss Red */
    --warning: #f5a623;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
    
    /* Layout */
--sidebar-width: 240px;
--sidebar-collapsed: 80px;
--topbar-height: 70px;
--radius-lg: 16px;
--radius-md: 12px;
--radius-sm: 8px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Header Support */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    z-index: 1000;
    background: rgba(10, 10, 11, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.global-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.global-header .brand:hover {
    opacity: 0.8;
}

.global-header .logo-text {
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    font-style: italic;
    color: white;
}

.global-header .nav-links {
    display: none;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .global-header .nav-links {
        display: flex;
    }
}

.global-header .nav-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.global-header .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}

.global-header .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

/* Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-content a.active {
    color: var(--accent-blue);
    background: rgba(0, 112, 243, 0.1);
}

/* User Controls */
.global-header .user-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-header .balance-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 6px 6px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-header .balance-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.global-header .add-balance-btn {
    background: var(--success);
    color: black;
    width: 26px;
    height: 26px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.global-header .add-balance-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Profile Menu */
.user-profile-menu {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px;
    border-radius: 18px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
}

.profile-info {
    text-align: right;
}

.profile-info .username {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.profile-info .level {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-trigger .avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 1001;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s;
}

.profile-dropdown a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    color: var(--error);
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 77, 77, 0.1);
}

/* Game Specific Navigation */
.game-nav {
    background: rgba(18, 18, 20, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    height: 44px;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    z-index: 999;
}

.game-nav .header-inner {
    padding: 0 32px;
}

.game-badge {
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.game-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.game-links a {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.game-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.game-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
    .game-links {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 4px;
    }
    .game-links a {
        flex-shrink: 0;
    }
}
    
/* Layout Structure */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-top: var(--topbar-height);
    padding-bottom: 60px;
    position: relative;
}

/* Adjust main content if game-nav exists */
.has-game-nav .main-content {
    margin-top: calc(var(--topbar-height) + 44px);
}

/* Responsive Grid Helper */
.responsive-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
    .responsive-grid {
        grid-template-columns: 1fr;
    }
}

/* Consistent Image Handling */
.img-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Common Thumbnail Sizes */
.avatar-sm { width: 32px; height: 32px; border-radius: 8px; }
.avatar-md { width: 48px; height: 48px; border-radius: 12px; }
.avatar-lg { width: 96px; height: 96px; border-radius: 24px; }

.skin-thumb-sm { width: 60px; height: 60px; }
.skin-thumb-md { width: 120px; height: 120px; }
.skin-thumb-lg { width: 200px; height: 200px; }

.case-thumb-md { width: 160px; height: 160px; }

/* Image Unification System */
.skin-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aspect Ratio Containers */
.aspect-skin { aspect-ratio: 1.2 / 1; }
.aspect-case { aspect-ratio: 1 / 1; }
.aspect-avatar { aspect-ratio: 1 / 1; }
.aspect-banner { aspect-ratio: 21 / 9; }

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    letter-spacing: -0.01em;
    position: relative;
}

@keyframes ambientDrift {
    0% { transform: translate3d(-1%, -1%, 0); opacity: 0.7; }
    50% { transform: translate3d(1%, 1%, 0); opacity: 0.95; }
    100% { transform: translate3d(-1%, -1%, 0); opacity: 0.7; }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1000px 600px at 85% 35%, rgba(0, 255, 136, 0.05) 0%, transparent 65%),
        radial-gradient(900px 520px at 15% 15%, rgba(0, 112, 243, 0.06) 0%, transparent 60%),
        radial-gradient(800px 500px at 50% 85%, rgba(121, 40, 202, 0.04) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: auto, auto, auto, 80px 80px, 80px 80px;
    background-position: center;
    mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    animation: ambientDrift 20s ease-in-out infinite;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.85rem); }

/* Premium Headline with Personality */
.hero-title {
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 6.5vw, 5.25rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.text-glow-gradient {
    background: linear-gradient(135deg, #00ff88 0%, #00f0ff 50%, #7928ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
    letter-spacing: -0.03em;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.2));
    display: inline-block;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium Card System */
.card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-premium {
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Form Elements */
.input-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px 16px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-premium:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.1);
}

/* Badges */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* Item Grids */
.item-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

@media (max-width: 640px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Button System */
.btn-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    gap: 8px;
    overflow: hidden;
}

.btn-premium.primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 112, 243, 0.3);
}

.btn-premium.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 112, 243, 0.5);
    filter: brightness(1.1);
}

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

.btn-premium.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heroAurora {
    0% { transform: translate3d(-10%, -10%, 0) rotate(0deg); opacity: 0.65; }
    50% { transform: translate3d(10%, 6%, 0) rotate(12deg); opacity: 0.9; }
    100% { transform: translate3d(-10%, -10%, 0) rotate(0deg); opacity: 0.65; }
}

@keyframes heroFloat {
    0% { transform: translate3d(0, 0, 0) rotate(-6deg); }
    50% { transform: translate3d(0, -16px, 0) rotate(6deg); }
    100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
}

@keyframes heroShine {
    0% { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
    25% { opacity: 0.55; }
    55% { opacity: 0; }
    100% { transform: translateX(140%) skewX(-18deg); opacity: 0; }
}

.hero-premium {
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: "";
    position: absolute;
    inset: -140px;
    background:
        radial-gradient(900px 520px at 15% 30%, rgba(0, 112, 243, 0.26) 0%, transparent 60%),
        radial-gradient(760px 520px at 85% 25%, rgba(121, 40, 202, 0.22) 0%, transparent 62%),
        radial-gradient(720px 520px at 65% 90%, rgba(0, 255, 136, 0.12) 0%, transparent 60%);
    filter: blur(18px);
    animation: heroAurora 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-premium::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
        linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-layer {
    position: relative;
    z-index: 1;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1 / 1;
    transform-style: preserve-3d;
    will-change: transform;
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    opacity: 0.55;
    pointer-events: none;
}

.hero-orb.orb-a {
    width: 280px;
    height: 280px;
    left: -40px;
    top: 60px;
    background: rgba(0, 112, 243, 0.35);
}

.hero-orb.orb-b {
    width: 240px;
    height: 240px;
    right: -30px;
    top: 20px;
    background: rgba(121, 40, 202, 0.28);
}

.hero-orb.orb-c {
    width: 220px;
    height: 220px;
    left: 40%;
    bottom: -40px;
    background: rgba(0, 255, 136, 0.16);
}

.spline-container {
    position: relative;
    width: 100%;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    overflow: visible;
    z-index: 10;
    pointer-events: auto;
    animation: heroFloat 8s ease-in-out infinite;
}

spline-viewer {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    outline: none;
}

.cs2-case3d {
    perspective: 980px;
    transform-style: preserve-3d;
}

.cs2-case3d::before {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 26px;
    background: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 65%);
    filter: blur(10px);
    transform: translateZ(-1px);
    pointer-events: none;
}

.cs2-case3d {
    --case-w: 280px;
    --case-h: 170px;
    --case-d: 92px;
    --case-base: #c9aa1f;
    --case-hi: #f2d657;
    --case-lo: #8a7311;
    --case-edge: rgba(0,0,0,0.25);
}

.cs2-case3d {
    width: var(--case-w);
    height: var(--case-h);
    border-radius: 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: heroFloat 4.8s ease-in-out infinite;
    transform: rotateX(18deg) rotateY(-28deg) translateZ(0);
    overflow: visible;
}

.cs2-case3d .case-face {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--case-hi), var(--case-base) 42%, var(--case-lo));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    backface-visibility: hidden;
}

.cs2-case3d .case-face.front {
    transform: translateZ(calc(var(--case-d) / 2));
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 40%),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.16) 0 8px, rgba(0,0,0,0) 8px 34px),
        linear-gradient(145deg, var(--case-hi), var(--case-base) 45%, var(--case-lo));
}

.cs2-case3d .case-face.back {
    transform: rotateY(180deg) translateZ(calc(var(--case-d) / 2));
    background:
        linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0) 55%),
        linear-gradient(145deg, var(--case-hi), var(--case-base) 45%, var(--case-lo));
}

.cs2-case3d .case-face.left {
    width: var(--case-d);
    left: calc((var(--case-w) - var(--case-d)) / 2);
    transform: rotateY(-90deg) translateZ(calc(var(--case-w) / 2));
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.12)), linear-gradient(145deg, var(--case-hi), var(--case-base) 55%, var(--case-lo));
}

.cs2-case3d .case-face.right {
    width: var(--case-d);
    left: calc((var(--case-w) - var(--case-d)) / 2);
    transform: rotateY(90deg) translateZ(calc(var(--case-w) / 2));
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18)), linear-gradient(145deg, var(--case-hi), var(--case-base) 55%, var(--case-lo));
}

.cs2-case3d .case-face.top {
    height: var(--case-d);
    top: calc((var(--case-h) - var(--case-d)) / 2);
    transform: rotateX(90deg) translateZ(calc(var(--case-h) / 2));
    background:
        linear-gradient(90deg, rgba(0,0,0,0.08), rgba(0,0,0,0) 30%, rgba(0,0,0,0.16)),
        linear-gradient(145deg, var(--case-hi), var(--case-base) 50%, var(--case-lo));
}

.cs2-case3d .case-face.bottom {
    height: var(--case-d);
    top: calc((var(--case-h) - var(--case-d)) / 2);
    transform: rotateX(-90deg) translateZ(calc(var(--case-h) / 2));
    background: linear-gradient(145deg, var(--case-lo), var(--case-base) 50%, #5e4f10);
}

.cs2-case3d .case-hardware {
    position: absolute;
    transform: translateZ(calc(var(--case-d) / 2 + 1px));
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(0,0,0,0.30));
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}

.cs2-case3d .case-hardware.latch {
    width: 34px;
    height: 44px;
    top: 18px;
    left: 22px;
}

.cs2-case3d .case-hardware.latch.latch-r {
    left: auto;
    right: 22px;
}

.cs2-case3d .case-hardware.handle {
    width: 112px;
    height: 26px;
    top: -10px;
    left: calc(50% - 56px);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.26), rgba(0,0,0,0.40)),
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.18), transparent 60%);
}

.cs2-case3d .case-decal {
    position: absolute;
    width: 140px;
    height: 88px;
    left: calc(50% - 70px);
    top: 52px;
    transform: translateZ(calc(var(--case-d) / 2 + 2px));
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 112, 243, 0.20), transparent 58%),
        radial-gradient(circle at 70% 60%, rgba(121, 40, 202, 0.18), transparent 62%),
        linear-gradient(180deg, rgba(0,0,0,0.10), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Glassmorphism Component */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

/* Glowing Elements */
.glow-blue {
    box-shadow: 0 0 20px var(--accent-glow);
}

.glow-text-blue {
    text-shadow: 0 0 10px var(--accent-blue);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.animate-fade-in {
    animation: fadeIn var(--transition-smooth) forwards;
}

/* Reusable UI Components (Pre-Tailwind Style) */
.btn-primary {
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(0, 112, 243, 0.4);
}

.btn-arena {
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    background: rgba(0, 255, 136, 0.08);
    color: #ffffff;
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 16px 36px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-arena::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 136, 0.25),
        transparent
    );
    transition: 0.6s;
}

.btn-arena:hover::before {
    left: 100%;
}

.btn-arena:hover {
    transform: translateY(-4px);
    background: rgba(0, 255, 136, 0.14);
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 0 12px 30px rgba(0, 255, 136, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-arena-secondary {
    font-family: 'Outfit', 'Space Grotesk', sans-serif;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 36px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-arena-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateY(-2px);
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
}

.input-field {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: white;
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

.input-field:focus {
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}
