@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --font-primary: 'DM Sans', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Brand palette - light (sunrise) */
    --color-background: #f7f1ff;
    --color-surface: rgba(255, 255, 255, 0.76);
    --color-surface-strong: rgba(255, 255, 255, 0.9);
    --color-surface-dim: rgba(255, 255, 255, 0.55);
    --color-text: #2d1b3d;
    --color-text-secondary: #5a5068;
    --color-border: rgba(45, 27, 61, 0.12);
    --color-border-strong: rgba(45, 27, 61, 0.18);
    --color-accent: #b16bf9;
    --border-color: var(--color-border);
    --border-light: rgba(45, 27, 61, 0.14);

    --primary-color: #b16bf9;
    --primary-dark: #8d4fdd;
    --secondary-color: #ff9d73;
    --accent-color: #f7c266;
    --success-color: #4ccaa1;
    --warning-color: #f5a524;
    --error-color: #ef476f;

    --bg-primary: var(--color-background);
    --bg-secondary: rgba(255, 255, 255, 0.72);
    --bg-dark: #0f1224;
    --bg-card: var(--color-surface);

    --text-primary: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    --text-light: rgba(90, 80, 104, 0.72);

    --shadow-sm: 0 8px 18px rgba(68, 41, 92, 0.08);
    --shadow-md: 0 14px 34px rgba(68, 41, 92, 0.12);
    --shadow-lg: 0 24px 60px rgba(68, 41, 92, 0.18);
    --shadow-xl: 0 30px 80px rgba(68, 41, 92, 0.22);
    --shadow-glow: 0 12px 40px rgba(240, 128, 149, 0.35);

    --radius-sm: 0.5rem;
    --radius-md: 0.85rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;
    --blur-level: 18px;

    --brand-gradient: linear-gradient(120deg, #b16bf9 0%, #f179b4 45%, #ffb679 100%);
    --brand-gradient-soft:
        radial-gradient(circle at 25% 20%, rgba(177, 107, 249, 0.18), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(255, 182, 121, 0.25), transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(118, 191, 255, 0.14), transparent 40%);
    --frosted-glass: blur(var(--blur-level));
}

[data-theme="dark"] {
    --color-background: #0f1224;
    --color-surface: rgba(19, 23, 46, 0.9);
    --color-surface-strong: rgba(26, 31, 58, 0.95);
    --color-surface-dim: rgba(26, 31, 58, 0.7);
    --color-text: #e7e9f7;
    --color-text-secondary: #b6bed5;
    --color-border: rgba(230, 235, 255, 0.08);
    --color-border-strong: rgba(230, 235, 255, 0.14);
    --color-accent: #caa1ff;
    --border-color: var(--color-border);
    --border-light: rgba(230, 235, 255, 0.1);

    --primary-color: #caa1ff;
    --primary-dark: #9f74e4;
    --secondary-color: #ffb690;
    --accent-color: #6bd1be;
    --success-color: #4ccaa1;
    --warning-color: #f8c76b;
    --error-color: #ff7b9c;

    --bg-primary: var(--color-background);
    --bg-secondary: rgba(19, 23, 46, 0.85);
    --bg-dark: #0b0f1e;
    --bg-card: var(--color-surface);

    --text-primary: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    --text-light: rgba(182, 190, 213, 0.72);

    --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.58);
    --shadow-glow: 0 12px 40px rgba(155, 125, 255, 0.4);

    --brand-gradient: linear-gradient(135deg, #9f74e4 0%, #ff9fb0 50%, #ffc97f 100%);
    --brand-gradient-soft:
        radial-gradient(circle at 18% 15%, rgba(159, 116, 228, 0.2), transparent 35%),
        radial-gradient(circle at 82% 10%, rgba(255, 159, 176, 0.22), transparent 30%),
        radial-gradient(circle at 30% 85%, rgba(84, 162, 255, 0.15), transparent 35%);
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: linear-gradient(135deg, 
        #e9d5ff 0%, 
        #f3e8ff 25%, 
        #fce7f3 50%, 
        #fed7aa 75%, 
        #fde68a 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    width: 400px;
    height: 600px;
    background: linear-gradient(135deg, #ddd6fe, #e9d5ff);
    top: -100px;
    left: -100px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #fecaca, #fed7aa);
    bottom: -150px;
    right: -100px;
    border-radius: 60% 40% 30% 70% / 60% 50% 40% 50%;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] body {
    background: radial-gradient(circle at 20% 20%, rgba(76, 68, 120, 0.22), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(143, 110, 224, 0.3), transparent 35%),
                radial-gradient(circle at 12% 80%, rgba(83, 141, 255, 0.2), transparent 35%),
                var(--bg-primary);
}

.glass-surface {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: var(--frosted-glass);
    -webkit-backdrop-filter: var(--frosted-glass);
}

.pill-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: #1f1032;
    border: none;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pill-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.pill-button:active {
    transform: translateY(1px);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(68, 41, 92, 0.12);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.theme-toggle .toggle-track {
    position: relative;
    width: 46px;
    height: 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    border: 1px solid var(--color-border);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
}

.theme-toggle .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-gradient);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease;
}

[data-theme="dark"] .theme-toggle .toggle-thumb {
    transform: translateX(22px);
}

.theme-toggle .toggle-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.floating-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}
