/* Premium Theme - Clean & Refined */
/* A sophisticated dark theme with subtle elegance */

:root {
    /* Core palette */
    --premium-bg: #0a0a0f;
    --premium-surface: #12121a;
    --premium-card: rgba(18, 18, 26, 0.8);

    /* Primary accent - warm gold */
    --accent-gold: #d4a853;
    --accent-gold-light: #e8c77b;
    --accent-gold-dark: #b8923f;

    /* Secondary accents */
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-cyan: #22d3ee;
    --accent-amber: #f59e0b;

    /* Neutrals */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(212, 168, 83, 0.3);

    /* Glass effects */
    --glass-bg: rgba(18, 18, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ============================================
   FLOATING ORB SYSTEM - Subtle Ambient Light
   ============================================ */

.orb-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Floating Orbs - Warm, subtle glow */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float-drift 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.3) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    animation-delay: 0s;
    animation-duration: 30s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    top: 40%;
    right: -100px;
    animation-delay: -8s;
    animation-duration: 35s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.2) 0%, transparent 70%);
    bottom: -50px;
    left: 30%;
    animation-delay: -15s;
    animation-duration: 28s;
}

.orb-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
    top: 60%;
    left: 10%;
    animation-delay: -20s;
    animation-duration: 32s;
}

@keyframes float-drift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.02);
    }
    50% {
        transform: translate(-15px, 15px) scale(0.98);
    }
    75% {
        transform: translate(-25px, -15px) scale(1.01);
    }
}

/* Sparkle Particles - Subtle gold dots */
.sparkle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0;
    animation: sparkle-float 10s ease-in-out infinite;
}

.sparkle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px 1px rgba(212, 168, 83, 0.5);
}

/* Sparkle positions */
.sparkle:nth-child(1) { left: 8%; top: 15%; animation-delay: 0s; }
.sparkle:nth-child(2) { left: 18%; top: 75%; animation-delay: 1s; }
.sparkle:nth-child(3) { left: 28%; top: 35%; animation-delay: 2s; }
.sparkle:nth-child(4) { left: 38%; top: 55%; animation-delay: 3s; }
.sparkle:nth-child(5) { left: 48%; top: 20%; animation-delay: 4s; }
.sparkle:nth-child(6) { left: 58%; top: 80%; animation-delay: 5s; }
.sparkle:nth-child(7) { left: 68%; top: 45%; animation-delay: 6s; }
.sparkle:nth-child(8) { left: 78%; top: 65%; animation-delay: 7s; }
.sparkle:nth-child(9) { left: 88%; top: 30%; animation-delay: 8s; }
.sparkle:nth-child(10) { left: 95%; top: 50%; animation-delay: 9s; }
.sparkle:nth-child(11) { left: 12%; top: 50%; animation-delay: 0.5s; }
.sparkle:nth-child(12) { left: 22%; top: 85%; animation-delay: 1.5s; }
.sparkle:nth-child(13) { left: 32%; top: 10%; animation-delay: 2.5s; }
.sparkle:nth-child(14) { left: 42%; top: 70%; animation-delay: 3.5s; }
.sparkle:nth-child(15) { left: 52%; top: 40%; animation-delay: 4.5s; }
.sparkle:nth-child(16) { left: 62%; top: 25%; animation-delay: 5.5s; }
.sparkle:nth-child(17) { left: 72%; top: 90%; animation-delay: 6.5s; }
.sparkle:nth-child(18) { left: 82%; top: 38%; animation-delay: 7.5s; }
.sparkle:nth-child(19) { left: 92%; top: 60%; animation-delay: 8.5s; }
.sparkle:nth-child(20) { left: 5%; top: 45%; animation-delay: 9.5s; }

@keyframes sparkle-float {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    15% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
        transform: translateY(-20px) scale(1);
    }
    85% {
        opacity: 0.6;
    }
}

/* Shooting Stars - Subtle */
.shooting-star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 168, 83, 0.6) 50%, transparent 100%);
    transform: rotate(-45deg);
    animation: shooting 8s ease-in-out infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    right: 0;
    width: 4px;
    height: 4px;
    background: var(--accent-gold-light);
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(212, 168, 83, 0.4);
    transform: translateY(-1.5px);
}

.shooting-star:nth-child(1) { top: 15%; left: 75%; animation-delay: 0s; }
.shooting-star:nth-child(2) { top: 25%; left: 90%; animation-delay: 4s; }
.shooting-star:nth-child(3) { top: 8%; left: 45%; animation-delay: 8s; width: 60px; }

@keyframes shooting {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translateX(0);
    }
    3% {
        opacity: 0.8;
    }
    12% {
        opacity: 0.8;
        transform: rotate(-45deg) translateX(-250px);
    }
    15%, 100% {
        opacity: 0;
        transform: rotate(-45deg) translateX(-300px);
    }
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-accent);
    transform: translateY(-4px);
}

.glass-card-subtle {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card-subtle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */

.btn-premium {
    position: relative;
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

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

.btn-primary-premium {
    background: var(--accent-gold);
    color: #0a0a0f;
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.25);
}

.btn-primary-premium:hover {
    background: var(--accent-gold-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212, 168, 83, 0.35);
}

.btn-gold-premium {
    background: var(--accent-gold);
    color: #0a0a0f;
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.25);
}

.btn-gold-premium:hover {
    background: var(--accent-gold-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212, 168, 83, 0.35);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ============================================
   TEXT STYLES - Clean, No Gradients
   ============================================ */

.gradient-text {
    color: var(--accent-gold);
}

.gradient-text-animated {
    color: var(--accent-gold);
    text-shadow: 0 0 40px rgba(212, 168, 83, 0.3);
}

.text-accent {
    color: var(--accent-gold);
}

/* ============================================
   FEATURE CARDS - 3D HOVER EFFECT
   ============================================ */

.feature-card-3d {
    position: relative;
    background: rgba(18, 18, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card-3d:hover {
    transform: translateY(-8px);
    border-color: var(--border-accent);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-accent);
}

/* Icon container with glow */
.icon-container {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
}

.feature-card-3d:hover .icon-container {
    transform: scale(1.08);
}

/* Color variants for icons */
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.icon-cyan { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }
.icon-gold { background: rgba(212, 168, 83, 0.15); color: var(--accent-gold); }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    position: relative;
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-accent);
}

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-gold);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   QUOTE SECTION
   ============================================ */

.quote-section {
    position: relative;
    background: rgba(212, 168, 83, 0.03);
    border-top: 1px solid rgba(212, 168, 83, 0.1);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.quote-marks {
    font-size: 3.5rem;
    line-height: 1;
    color: var(--accent-gold);
    opacity: 0.3;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 168, 83, 0.03) 100%);
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.3), transparent);
}

/* ============================================
   PROFILE PAGE STYLES
   ============================================ */

.profile-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.profile-avatar {
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
    box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.2), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.profile-rank-badge {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.15);
}

.profile-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.profile-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    border-color: rgba(212, 168, 83, 0.3);
}

.achievement-card.unlocked:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(212, 168, 83, 0.1);
}

.achievement-card.locked {
    opacity: 0.5;
}

.game-session-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px 20px;
    transition: all 0.3s ease;
}

.game-session-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.streak-day {
    transition: all 0.3s ease;
}

.streak-day.active {
    background: linear-gradient(135deg, var(--accent-amber), #ea580c);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.streak-day.inactive {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .floating-orb {
        opacity: 0.15;
    }

    .orb-1 { width: 250px; height: 250px; }
    .orb-2 { width: 200px; height: 200px; }
    .orb-3 { width: 180px; height: 180px; }
    .orb-4 { width: 150px; height: 150px; }

    .shooting-star-container {
        display: none;
    }

    .feature-card-3d:hover {
        transform: translateY(-4px);
    }
}

/* ============================================
   THEME OVERRIDES
   ============================================ */

/* Body background */
body.bg-gray-900 {
    background: var(--premium-bg) !important;
}

/* Navbar */
nav.bg-gray-800 {
    background: rgba(12, 12, 18, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Active nav link */
nav a.text-blue-400.bg-gray-900\/50 {
    background: rgba(212, 168, 83, 0.1) !important;
    color: var(--accent-gold) !important;
}

/* Logo area */
nav .w-10.h-10.bg-blue-600 {
    background: var(--accent-gold) !important;
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.3) !important;
}

nav .text-blue-500 {
    color: var(--accent-gold) !important;
}

/* Primary buttons */
button.bg-blue-600, a.bg-blue-600 {
    background: var(--accent-gold) !important;
    color: #0a0a0f !important;
    box-shadow: 0 8px 25px rgba(212, 168, 83, 0.2) !important;
}

button.bg-blue-600:hover, a.bg-blue-600:hover {
    background: var(--accent-gold-light) !important;
    transform: translateY(-2px);
}

/* Footer */
footer.bg-gray-900 {
    background: var(--premium-bg) !important;
    border-top-color: rgba(255, 255, 255, 0.05) !important;
}

/* Scrollbar */
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-gold-dark), var(--accent-gold)) !important;
}

/* Toast notifications */
#toast-container > div {
    backdrop-filter: blur(12px);
}

/* Yellow/Gold button overrides for consistency */
a.bg-yellow-600, button.bg-yellow-600 {
    background: var(--accent-gold) !important;
    color: #0a0a0f !important;
}

a.bg-yellow-600:hover, button.bg-yellow-600:hover {
    background: var(--accent-gold-light) !important;
}

/* Border yellow to gold */
.border-yellow-500 {
    border-color: var(--accent-gold) !important;
}
