@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   PLANBAR - Sky Blue Weather Theme
   Fresh, airy colors inspired by clear skies and weather
   ========================================================================== */

:root {
    /* Sky-Inspired Background */
    --bg-gradient-start: #f0f9ff;
    /* Sky 50 */
    --bg-gradient-mid: #e0f2fe;
    /* Sky 100 */
    --bg-gradient-end: #bae6fd;
    /* Sky 200 */

    /* Surfaces */
    --surface-primary: #ffffff;
    --surface-secondary: #f0f9ff;
    --surface-elevated: #ffffff;

    /* Sky Blue Accent */
    --accent-sky: #0ea5e9;
    /* Sky 500 */
    --accent-sky-light: #38bdf8;
    /* Sky 400 */
    --accent-sky-soft: rgba(14, 165, 233, 0.1);
    --accent-sky-glow: rgba(14, 165, 233, 0.25);

    /* Text Colors - High Contrast */
    --text-primary: #0c4a6e;
    /* Sky 900 */
    --text-secondary: #0369a1;
    /* Sky 700 */
    --text-muted: #7dd3fc;
    /* Sky 300 */
    --text-on-dark: #f0f9ff;

    /* Borders & Shadows */
    --border-subtle: rgba(14, 165, 233, 0.15);
    --border-medium: rgba(14, 165, 233, 0.25);
    --shadow-soft: 0 2px 8px rgba(14, 165, 233, 0.08);
    --shadow-medium: 0 8px 24px rgba(14, 165, 233, 0.12);
    --shadow-strong: 0 16px 48px rgba(14, 165, 233, 0.16);
    --shadow-glow: 0 0 24px rgba(14, 165, 233, 0.2);
}

html.dark {
    /* Deep Space Glass Background (Midnight + Violet Nebula) */
    --bg-gradient-start: #020617;
    /* Slate 950 */
    --bg-gradient-mid: #1e1b4b;
    /* Indigo 950 */
    --bg-gradient-end: #2e1065;
    /* Violet 950 */

    /* Surfaces - High Tech Glass */
    --surface-primary: #020617;
    --surface-secondary: #0f172a;
    --surface-elevated: #1e1b4b;

    /* Text Colors - High Contrast Neon */
    --text-primary: #e2e8f0;
    /* Slate 200 */
    --text-secondary: #67e8f9;
    /* Cyan 300 (Neon) */
    --text-muted: #c084fc;
    /* Purple 400 */
    --text-on-dark: #ffffff;

    /* Deep Space Accents */
    --border-subtle: rgba(34, 211, 238, 0.2);
    /* Cyan Glow */
    --border-medium: rgba(192, 132, 252, 0.3);
    /* Purple Glow */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-medium: 0 12px 30px rgba(0, 0, 0, 0.8);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.25);
    /* Cyan Glow Effect */
}

/* ==========================================================================
   Base Font Size - Prevents system font scaling from affecting the webapp
   ========================================================================== */
html {
    /* Fixed base font size - ignores system font scaling */
    font-size: 16px !important;
    /* Prevent automatic text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Inherit the fixed font size from html */
    font-size: 1rem;
    background-color: var(--bg-gradient-start);
    /* Deep Space Nebula Gradient */
    background-image:
        radial-gradient(at 10% 10%, rgba(34, 211, 238, 0.1) 0px, transparent 40%),
        /* Cyan Top Left */
        radial-gradient(at 90% 20%, rgba(219, 39, 119, 0.1) 0px, transparent 40%),
        /* Pink Top Right */
        radial-gradient(at 50% 90%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
        /* Violet Bottom */
        linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   Glass Panel - Main container with frosted glass effect
   ========================================================================== */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 1.75rem;
    box-shadow:
        var(--shadow-medium),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    box-shadow:
        var(--shadow-strong),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.dark .glass-panel {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(56, 189, 248, 0.1);
    box-shadow: var(--shadow-medium), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark .glass-panel:hover {
    box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Data Cards - Weather metric tiles with depth
   ========================================================================== */
.data-card {
    background: linear-gradient(135deg,
            var(--surface-secondary) 0%,
            rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect */
.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.6) 0%,
            transparent 100%);
    pointer-events: none;
    border-radius: 1.25rem 1.25rem 0 0;
}

.data-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent-sky);
    box-shadow:
        var(--shadow-medium),
        var(--shadow-glow);
}

html.dark .data-card {
    background: linear-gradient(145deg,
            rgba(2, 6, 23, 0.7) 0%,
            rgba(30, 27, 75, 0.6) 100%);
    backdrop-filter: blur(16px);
    border-color: rgba(34, 211, 238, 0.15);
    /* Cyan border */
}

html.dark .data-card::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 100%);
}

/* ==========================================================================
   Loading Spinner - Smooth sky-blue animation
   ========================================================================== */
.loading-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid var(--accent-sky-soft);
    border-top-color: var(--accent-sky);
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Chart & Interactive Elements
   ========================================================================== */
canvas {
    cursor: crosshair;
    border-radius: 1rem;
}

/* Focus states */
input:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-sky-soft);
}

/* Text selection */
::selection {
    background: var(--accent-sky);
    color: var(--text-on-dark);
}

/* Utility: Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-sky) 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Auth Modal
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid var(--border-medium);
}

.modal.active .modal-content {
    transform: scale(1);
}

html.dark .modal-content {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-medium);
    background: var(--surface-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-sky);
    box-shadow: 0 0 0 3px var(--accent-sky-soft);
}

.btn-primary {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.75rem;
    background: var(--accent-sky);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-sky-light);
    transform: translateY(-1px);
}

.btn-secondary {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.75rem;
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    background: var(--surface-secondary);
    color: var(--accent-sky);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.6;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-medium);
}

.auth-divider::before {
    margin-right: 0.5em;
}

.auth-divider::after {
    margin-left: 0.5em;
}

.btn-social {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-social:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-apple {
    background: #000;
    color: #fff;
}

html.dark .btn-apple {
    background: #fff;
    color: #000;
}

.btn-google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

html.dark .btn-google {
    background: #1e293b;
    color: #fff;
    border-color: #334155;
}

.btn-github {
    background: #24292f;
    color: #fff;
}

html.dark .btn-github {
    background: #fff;
    color: #24292f;
}

/* ==========================================================================
   Sport Tab Selector
   ========================================================================== */
.sport-tab {
    color: #64748b;
    background: transparent;
}

.sport-tab.active {
    background: white;
    color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sport-tab:hover:not(.active) {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

html.dark .sport-tab {
    color: #94a3b8;
}

html.dark .sport-tab.active {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}


/* ==========================================================================
   Spam Protection Utility
   ========================================================================== */
.protected-text {
    unicode-bidi: bidi-override;
    direction: rtl;
    cursor: pointer;
}