@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&family=Rubik+Dirt&display=swap');

/* ════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════ */
:root {
    --bg-dark:          #050505;
    --bg-card:          rgba(10, 10, 12, 0.75);
    --bg-surface:       rgba(18, 18, 22, 0.9);
    --accent-red:       #e60000;
    --accent-red-mid:   #cc0000;
    --accent-red-deep:  #8b0000;
    --accent-red-glow:  rgba(230, 0, 0, 0.35);
    --accent-blue:      #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.35);
    --text-primary:     #f1f1f3;
    --text-secondary:   #9ca3af;
    --text-muted:       #6b7280;
    --border-red:       rgba(230, 0, 0, 0.18);
    --border-white:     rgba(255, 255, 255, 0.07);
    --glass-bg:         rgba(16, 16, 20, 0.65);
    --radius-sm:        0.6rem;
    --radius-md:        1rem;
    --radius-lg:        1.5rem;
    --radius-xl:        2rem;
    --shadow-card:      0 8px 32px rgba(0, 0, 0, 0.55);
    --shadow-glow:      0 0 30px var(--accent-red-glow);
    --transition:       all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ════════════════════════════════════════
   BASE RESET
════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    /* Premium animated grid background */
    background-image:
        linear-gradient(rgba(230, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 0, 0, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(180, 0, 0, 0.12) 0%, transparent 70%);
    background-size: 60px 60px, 60px 60px, 100% 100%;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════
   LAYOUT
════════════════════════════════════════ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1;   }
    50%       { opacity: 0.5; }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(120px) scale(0.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(120px) scale(0.9); }
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spinBorder {
    to { transform: rotate(360deg); }
}
@keyframes heroGlow {
    0%, 100% { text-shadow: 0 0 80px rgba(230, 0, 0, 0.2); }
    50%       { text-shadow: 0 0 120px rgba(230, 0, 0, 0.4); }
}

.stagger-in {
    opacity: 0;
    animation: fadeInUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-in:nth-child(2) { animation-delay: 0.1s; }
.stagger-in:nth-child(3) { animation-delay: 0.2s; }
.stagger-in:nth-child(4) { animation-delay: 0.3s; }

/* ════════════════════════════════════════
   HEADER / NAVIGATION
════════════════════════════════════════ */
#header-placeholder {
    /* Sticky header container — MUST be relatively positioned for sticky to work */
    position: sticky;
    top: 0;
    z-index: 9000;
    padding: 1rem 0 0;
    /* Glass bleed behind header when scrolling */
    background: linear-gradient(to bottom, rgba(5,5,5,0.98) 60%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-bottom: 0;
}

header {
    padding: 0 0 1rem;
    position: relative;
    /* No z-index here — parent #header-placeholder handles it */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    /* No backdrop-filter on nav — it was creating a stacking context
       that trapped the dropdown inside (preventing clicks) */
    background: rgba(12, 12, 16, 0.92);
    border: 1px solid var(--border-red);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: var(--transition);
    position: relative; /* anchor for absolute children */
    /* CRITICAL: overflow must be visible so dropdown extends below nav */
    overflow: visible;
}

.logo {
    font-family: 'Rubik Dirt', cursive;
    font-size: 1.6rem;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--accent-red-glow);
    flex-shrink: 0;
}

.logo a {
    text-decoration: none;
    color: inherit !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo span.accent { color: var(--accent-red); }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-red);
    color: var(--text-primary);
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    line-height: 1;
}
.menu-toggle:hover {
    background: rgba(230, 0, 0, 0.15);
    border-color: var(--accent-red);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(230, 0, 0, 0.1);
    text-shadow: 0 0 8px var(--accent-red-glow);
}

/* ════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════ */
.hero {
    padding: 7rem 0 5rem;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(230, 0, 0, 0.08);
    border: 1px solid rgba(230, 0, 0, 0.25);
    color: var(--accent-red);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
}

.hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 2rem;
    margin-bottom: 2rem;
    animation: pulse 4s infinite ease-in-out;
}

.hero-3d-model {
    position: absolute;
    top: 5%;
    right: 0%;
    width: 600px;
    height: 600px;
    z-index: -1;
    opacity: 0.95;
}

spline-viewer {
    width: 100%;
    height: 100%;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2.5px;
    margin-bottom: 1.5rem;
    background: linear-gradient(160deg, #ffffff 0%, #c8c8cc 55%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGlow 6s ease-in-out infinite;
}

.hero h1 .text-accent {
    background: linear-gradient(135deg, var(--accent-red) 0%, #ff4444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: none;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-deep) 100%);
    color: #fff;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px -4px var(--accent-red-glow);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px -6px rgba(230, 0, 0, 0.55);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(-1px) scale(1); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    padding: 0.85rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: #f87171;
}

/* ════════════════════════════════════════
   CARDS
════════════════════════════════════════ */
.studio-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-red);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.studio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(230,0,0,0.07) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    border-radius: inherit;
}

.studio-card:hover {
    transform: translateY(-8px);
    border-color: rgba(230, 0, 0, 0.5);
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(230,0,0,0.15), var(--shadow-glow);
}
.studio-card:hover::after { opacity: 1; }

/* ════════════════════════════════════════
   STUDIO GRID
════════════════════════════════════════ */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* ════════════════════════════════════════
   BADGES
════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue    { background: rgba(230,0,0,0.1);    color: #ff4444;  border: 1px solid rgba(230,0,0,0.25); }
.badge-emerald { background: rgba(16,185,129,0.1); color: #34d399;  border: 1px solid rgba(16,185,129,0.2); }
.badge-gold    { background: rgba(251,191,36,0.1); color: #fbbf24;  border: 1px solid rgba(251,191,36,0.2); }
.badge-gray    { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-white); }

/* ════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════ */
.text-accent    { color: var(--accent-red); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.font-bold      { font-weight: 800; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-4  { margin-bottom: 2rem; }
.mt-auto { margin-top: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ════════════════════════════════════════
   TOAST NOTIFICATIONS
════════════════════════════════════════ */
#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.4rem;
    background: rgba(12, 12, 16, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-white);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    min-width: 280px;
    max-width: 380px;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: all;
}

.toast.success {
    border-left: 3px solid #34d399;
    border-color: rgba(52,211,153,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(52,211,153,0.1);
}
.toast.error {
    border-left: 3px solid #f87171;
    border-color: rgba(248,113,113,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(248,113,113,0.1);
}

/* ════════════════════════════════════════
   AUTH FORMS
════════════════════════════════════════ */
.auth-page-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-form-container {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    padding: 3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-red);
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-card), 0 0 60px rgba(230,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.auth-form-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230,0,0,0.4), transparent);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-white);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-red);
    background: rgba(230, 0, 0, 0.04);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.form-group select option { background: #0d0d0f; }

/* ════════════════════════════════════════
   PROFILE GRID
════════════════════════════════════════ */
.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* ════════════════════════════════════════
   COIN CARD
════════════════════════════════════════ */
.coin-card {
    background: linear-gradient(135deg, rgba(40, 0, 0, 0.8) 0%, rgba(5,5,5,0.95) 100%);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(230, 0, 0, 0.2);
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coin-card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 140%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(230,0,0,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.coin-card h2 {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--accent-red);
    text-shadow: 0 0 20px var(--accent-red-glow);
    margin: 0.5rem 0;
    letter-spacing: -1px;
}

/* ════════════════════════════════════════
   DATA TABLES
════════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.9rem 1.2rem;
    text-align: left;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--border-red);
}

.data-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: rgba(230, 0, 0, 0.03);
}

.data-table tr:last-child td { border-bottom: none; }

/* ════════════════════════════════════════
   SKELETON LOADING
════════════════════════════════════════ */
.shadow-loading {
    background: linear-gradient(110deg, #0d0d0f 20%, #181820 40%, #0d0d0f 60%);
    background-size: 300% 100%;
    animation: shimmer 1.8s linear infinite;
    border-color: transparent !important;
}

/* ════════════════════════════════════════
   SECTION HEADINGS
════════════════════════════════════════ */
.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.section-heading h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--accent-red-glow), transparent);
    margin: 1rem 0 2.5rem;
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border-red);
    margin-top: 8rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-red-glow) 50%, transparent 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3.5rem;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.footer-col .logo { margin-bottom: 1rem; font-size: 1.2rem; }

.footer-col p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.7rem; }

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-col ul li a:hover {
    color: var(--accent-red);
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ════════════════════════════════════════
   USER MENU & DROPDOWN
════════════════════════════════════════ */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border-red);
    cursor: pointer;
    transition: var(--transition);
    object-fit: cover;
    background: var(--bg-card);
}

.user-avatar:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px var(--accent-red-glow);
    transform: scale(1.08);
}

.user-dropdown {
    /* Positioned relative to .user-menu (position:relative) */
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 220px;
    /* Solid background — no backdrop-filter (prevents pointer-event bugs) */
    background: rgba(8, 8, 11, 0.98);
    border: 1px solid var(--border-white);
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    display: none;
    flex-direction: column;
    /* High z-index within #header-placeholder stacking context */
    z-index: 500;
    box-shadow: 0 24px 64px -8px rgba(0,0,0,0.9), 0 0 0 1px rgba(230,0,0,0.1), 0 0 40px rgba(230,0,0,0.05);
    animation: dropdownIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* Guarantee pointer events work */
    pointer-events: all;
}

.user-dropdown.active { display: flex; }

.user-dropdown-header {
    padding: 0.6rem 0.8rem 0.8rem;
    border-bottom: 1px solid var(--border-white);
    margin-bottom: 0.4rem;
}

.user-dropdown-header .name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-dropdown-header .balance {
    font-size: 0.75rem;
    color: var(--accent-red);
    margin-top: 2px;
    font-weight: 600;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.user-dropdown .divider {
    height: 1px;
    background: var(--border-white);
    margin: 0.4rem 0.25rem;
}

.user-dropdown .logout-link { color: #f87171 !important; }
.user-dropdown .logout-link:hover { background: rgba(248, 113, 113, 0.08) !important; }

/* ════════════════════════════════════════
   MODAL
════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ════════════════════════════════════════
   ADMIN PANEL
════════════════════════════════════════ */
.admin-body { overflow: hidden; }

.admin-container {
    display: flex;
    height: 100vh;
    max-width: 100vw;
    padding: 0;
    overflow: hidden;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(6, 6, 9, 0.98);
    border-right: 1px solid var(--border-red);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar-header {
    padding: 1.75rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-red);
}

.admin-sidebar-logo {
    font-family: 'Rubik Dirt', cursive;
    font-size: 1rem;
    color: var(--text-primary);
    text-shadow: 0 0 12px var(--accent-red-glow);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.admin-sidebar-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-nav {
    list-style: none;
    padding: 1rem 0.75rem;
    flex: 1;
}

.admin-nav li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 0.2rem;
    transition: var(--transition);
    font-size: 0.88rem;
    font-weight: 600;
    position: relative;
}

.admin-nav li .nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.admin-nav li * { pointer-events: none; }

.admin-nav li:hover {
    background: rgba(230, 0, 0, 0.07);
    color: var(--text-secondary);
}

.admin-nav li.active {
    background: rgba(230, 0, 0, 0.12);
    color: var(--accent-red);
}

.admin-nav li.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 2px;
    background: var(--accent-red);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--accent-red-glow);
}

.admin-nav-divider {
    height: 1px;
    background: var(--border-white);
    margin: 0.75rem 0.5rem;
}

.admin-nav-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-red);
}

.admin-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(230,0,0,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230,0,0,0.025) 1px, transparent 1px),
        #060608;
    background-size: 48px 48px;
    background-attachment: local;
}

.admin-main-inner {
    padding: 2.5rem 3rem;
    max-width: 1200px;
}

.admin-page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-white);
}

.admin-page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
}

.admin-page-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Admin Dashboard Stats Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.admin-stat-card {
    background: rgba(10, 10, 13, 0.9);
    border: 1px solid var(--border-red);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-red), transparent);
}

.admin-stat-card:hover {
    border-color: rgba(230,0,0,0.35);
    transform: translateY(-2px);
}

.admin-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.admin-stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1;
}

.admin-stat-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.4rem;
    opacity: 0.3;
}

/* Admin input styles (panel-specific) */
.admin-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-white);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    outline: none;
    transition: var(--transition);
}
.admin-input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(230,0,0,0.1);
}
.admin-input::placeholder { color: var(--text-muted); }

/* ════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════ */
@media (max-width: 1024px) {
    .profile-grid { grid-template-columns: 1fr; }
    .hero h1 { letter-spacing: -2px; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }

    .menu-toggle { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        /* Mobile auth/nav drops down over everything else */
        z-index: 999;
        background: rgba(8, 8, 11, 0.98);
        border: 1px solid var(--border-red);
        border-radius: var(--radius-lg);
        padding: 1rem;
        gap: 0.2rem;
    }
    .nav-links.active { display: flex; }

    .nav-links a {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
    }
    
    .mobile-balance {
        padding: 0.8rem 1rem !important;
        margin-top: 0.2rem;
        border-top: 1px solid rgba(255,255,255,0.05);
        color: var(--accent-red) !important;
        background: rgba(230,0,0,0.05);
        border-radius: var(--radius-sm);
        display: block !important;
    }

    .hero { padding: 4rem 0 3rem; overflow: hidden; }
    .hero-3d-model { display: none !important; }
    .hero h1 { letter-spacing: -1.5px; }
    .hero p { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }

    .studio-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

    .auth-form-container { padding: 2rem 1.5rem; margin: 1rem; }

    /* Admin mobile */
    .admin-body { overflow: auto; }
    .admin-container { flex-direction: column; height: auto; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-red); }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.75rem; }
    .admin-nav li { flex: 1 1 140px; min-width: 120px; justify-content: center; text-align: center; }
    .admin-nav li::before { display: none; }
    .admin-nav-divider { display: none; }
    .admin-main { height: auto; }
    .admin-main-inner { padding: 1.5rem; }

    .user-dropdown {
        right: auto;
        left: 0;
        min-width: 200px;
        position: absolute;
    }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; }
    #header-placeholder { padding-top: 32px; }
    .hero h1 { letter-spacing: -1px; }
    .studio-card { padding: 1.75rem; border-radius: var(--radius-lg); }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ════════════════════════════════════════
   SCROLLBAR STYLING
════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(230,0,0,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(230,0,0,0.45); }

/* ════════════════════════════════════════
   SELECTION COLOR
════════════════════════════════════════ */
::selection { background: rgba(230,0,0,0.3); color: #fff; }
