/* Beelang Theme - Design System */
/* @import font via Google Fonts in layout */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
    /* ===== TYPOGRAPHY ===== */
    --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    --font-size-4xl: 32px;
    --font-size-5xl: 40px;
    
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;
    
    /* ===== COLORS - Primary ===== */
    --color-primary: #1A77AA;
    --color-primary-light: #2D9AD8;
    --color-primary-dark: #145A85;
    --color-primary-subtle: rgba(26, 119, 170, 0.08);
    --color-primary-glow: rgba(26, 119, 170, 0.15);
    
    /* ===== COLORS - Accent ===== */
    --color-accent: #F97316;
    --color-accent-light: #FB923C;
    
    /* ===== COLORS - Status (Desaturated) ===== */
    --color-success: #22C55E;
    --color-success-subtle: rgba(34, 197, 94, 0.12);
    --color-warning: #F59E0B;
    --color-warning-subtle: rgba(245, 158, 11, 0.12);
    --color-error: #EF4444;
    --color-error-subtle: rgba(239, 68, 68, 0.12);
    --color-info: #3B82F6;
    --color-info-subtle: rgba(59, 130, 246, 0.12);
    
    /* ===== COLORS - Neutrals (Cool Gray) ===== */
    --color-bg-page: #F8FAFC;
    --color-bg-card: #FFFFFF;
    --color-bg-elevated: #F1F5F9;
    --color-border: #E2E8F0;
    --color-text-primary: #0F172A;
    --color-text-secondary: #334155;
    --color-text-muted: #64748B;
    --color-text-faint: #94A3B8;
    --color-white: #FFFFFF;
    
    /* ===== SHADOWS - Tinted ===== */
    --shadow-sm: 0 1px 3px var(--color-primary-subtle), 0 1px 2px var(--color-primary-subtle);
    --shadow-md: 0 4px 12px var(--color-primary-glow);
    --shadow-lg: 0 8px 24px var(--color-primary-glow);
    --shadow-xl: 0 12px 40px var(--color-primary-glow);
    
    /* ===== BORDER RADIUS ===== */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;
    
    /* ===== TRANSITIONS - Spring Physics ===== */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
    --duration-slow: 0.4s;
    
    /* ===== SPACING ===== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* ===== Z-INDEX ===== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ===== TYPOGRAPHY CLASSES ===== */
.font-display {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
}

.font-heading {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
}

.font-body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
}

.font-tabular {
    font-variant-numeric: tabular-nums;
}

/* ===== BUTTONS ===== */
.btn-beelang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-spring);
    border: none;
    text-decoration: none;
}

.btn-beelang-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-beelang-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-beelang-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-beelang-secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
}

.btn-beelang-secondary:hover {
    background: var(--color-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-beelang-accent {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-beelang-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== CARDS ===== */
.card-beelang {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-spring);
}

.card-beelang:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ===== BADGES ===== */
.badge-beelang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-beelang-primary {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
}

.badge-beelang-success {
    background: var(--color-success-subtle);
    color: var(--color-success);
}

.badge-beelang-warning {
    background: var(--color-warning-subtle);
    color: var(--color-warning);
}

.badge-beelang-error {
    background: var(--color-error-subtle);
    color: var(--color-error);
}

/* ===== FORM ELEMENTS ===== */
.input-beelang {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background: var(--color-bg-card);
    transition: all var(--duration-fast) var(--ease-out);
}

.input-beelang:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-subtle);
}

.input-beelang::placeholder {
    color: var(--color-text-faint);
}

/* ===== PROGRESS ===== */
.progress-beelang {
    width: 100%;
    height: 10px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-beelang-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-spring);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.5s var(--ease-out) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

.animate-pulse {
    animation: pulse 2s ease infinite;
}

.animate-shake {
    animation: shake 0.4s ease;
}

.animate-correct {
    animation: correctPulse 0.5s ease;
}

/* Stagger Delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.4s; }

/* ===== UTILITIES ===== */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ===== RESPONSIVE VISIBILITY ===== */
@media (max-width: 640px) {
    .hide-mobile { display: none; }
}

@media (min-width: 641px) {
    .show-mobile-only { display: none; }
}