/* Custom styles layered on top of Tailwind utilities */

:root {
    color-scheme: dark;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Glow / glass cards ---- */
.glass {
    background: linear-gradient(180deg, rgba(28, 35, 60, 0.65), rgba(15, 20, 38, 0.65));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(120, 140, 200, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 24px 48px -24px rgba(10, 14, 30, 0.7);
}

.glass-strong {
    background: linear-gradient(180deg, rgba(40, 50, 90, 0.85), rgba(20, 26, 50, 0.85));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(120, 140, 200, 0.18);
}

/* Aurora background */
.aurora {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    pointer-events: none;
}
.aurora::before, .aurora::after {
    content: ""; position: absolute; border-radius: 9999px;
    filter: blur(110px); opacity: 0.55;
}
.aurora::before {
    width: 50vw; height: 50vw; left: -10vw; top: -10vw;
    background: radial-gradient(circle, #2447dd, transparent 60%);
    animation: drift 20s ease-in-out infinite alternate;
}
.aurora::after {
    width: 60vw; height: 60vw; right: -15vw; bottom: -20vw;
    background: radial-gradient(circle, #7c3aed, transparent 60%);
    animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift {
    from { transform: translate3d(0,0,0) scale(1); }
    to   { transform: translate3d(40px, 30px, 0) scale(1.1); }
}
@keyframes drift2 {
    from { transform: translate3d(0,0,0) scale(1); }
    to   { transform: translate3d(-40px, -20px, 0) scale(1.08); }
}

/* Trophy gradient */
.gradient-gold {
    background-image: linear-gradient(135deg, #fcd34d 0%, #f59e0b 40%, #d97706 100%);
}
.gradient-purple {
    background-image: linear-gradient(135deg, #a78bfa 0%, #7c3aed 40%, #5b21b6 100%);
}
.gradient-blue {
    background-image: linear-gradient(135deg, #60a5fa 0%, #3a64f7 40%, #1a318c 100%);
}
.gradient-green {
    background-image: linear-gradient(135deg, #34d399 0%, #10b981 40%, #047857 100%);
}
.gradient-red {
    background-image: linear-gradient(135deg, #fb7185 0%, #ef4444 40%, #b91c1c 100%);
}

/* skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 800px 100%;
    animation: shimmer 1.4s linear infinite;
}

/* Avatar fallback */
.avatar-init {
    background: linear-gradient(135deg, #3a64f7, #7c3aed);
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(120, 140, 200, 0.25);
    border-radius: 8px;
    border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 140, 200, 0.45); border: 2px solid transparent; background-clip: padding-box; }

/* Light theme overrides */
html:not(.dark) body {
    background: #f4f6fb;
    color: #0f172a;
}
html:not(.dark) .glass {
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,247,252,0.85));
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.18);
}
html:not(.dark) .glass-strong {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,247,252,0.95));
    border: 1px solid rgba(15, 23, 42, 0.08);
}
html:not(.dark) .aurora { opacity: 0.45; }
html:not(.dark) .skeleton {
    background: linear-gradient(90deg, rgba(15,23,42,0.06) 0%, rgba(15,23,42,0.12) 50%, rgba(15,23,42,0.06) 100%);
    background-size: 800px 100%;
}

/* tab-active line */
.tab-active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
    height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, #6188ff, #a78bfa);
}

/* Heatmap cell tooltip helper */
.heatmap-cell {
    transition: transform 0.15s ease;
}
.heatmap-cell:hover { transform: scale(1.2); }

/* Chart container fix for mobile */
.chart-container { width: 100%; min-height: 280px; }
@media (min-width: 768px) {
    .chart-container { min-height: 320px; }
}
