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

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-alt: #f9fafb;
    --border-light: #f3f4f6;
    --border: #e5e5e5;
    --text-muted: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-secondary: #6b7280;
    --text-body: #4b5563;
    --text-primary: #111827;
    --accent-light: #dbeafe;
    --accent: #2563eb;
    --success: #059669;
    --danger: #e11d48;
    --font-sans: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 2px 10px -3px rgba(0, 0, 0, 0.05);
    --radius-xl: 0.75rem;
    --milestone-bg: #f9fafb;
    --milestone-border: #e3e6ea;
    --milestone-name-color: #3b3d42;
    --milestone-achieved-bg: #ecf9ef;
    --milestone-achieved-border: #8dd49b;
    --milestone-achieved-shadow: rgba(0, 128, 0, 0.15);
    --milestone-inactive-bg: #f1f2f4;
    --milestone-inactive-border: #d7d9dd;
    --milestone-inactive-name: #8c8f95;
    --toast-error-bg: #fff1f2;
    --toast-error-border: #fecdd3;
    --toast-error-color: #be123c;
    --dropdown-bg: #fff;
    --dropdown-border: #ccc;
    --overlay-bg: rgba(17, 24, 39, 0.45);
    --progress-track: #d7d9dd;
    --progress-fill: #5a9e6b;
}

[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #141620;
    --surface-alt: #1a1d27;
    --border-light: #1e2130;
    --border: #2a2d3a;
    --text-muted: #3a3d4a;
    --text-tertiary: #6b7280;
    --text-secondary: #9ca3af;
    --text-body: #d1d5db;
    --text-primary: #e5e7eb;
    --accent-light: #1e3a5f;
    --accent: #3b82f6;
    --success: #34d399;
    --danger: #fb7185;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 10px -3px rgba(0, 0, 0, 0.3);
    --milestone-bg: #1a1d27;
    --milestone-border: #2a2d3a;
    --milestone-name-color: #d1d5db;
    --milestone-achieved-bg: #132a1a;
    --milestone-achieved-border: #2d6a3e;
    --milestone-achieved-shadow: rgba(0, 128, 0, 0.25);
    --milestone-inactive-bg: #1a1d27;
    --milestone-inactive-border: #2a2d3a;
    --milestone-inactive-name: #6b7280;
    --toast-error-bg: #2d1215;
    --toast-error-border: #5c1d28;
    --toast-error-color: #fb7185;
    --dropdown-bg: #1a1d27;
    --dropdown-border: #3a3d4a;
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --progress-track: #2a2d3a;
    --progress-fill: #2d6a3e;
}

[data-theme="brown"] {
    --bg: #1c1612;
    --surface: #2a2118;
    --surface-alt: #332a1f;
    --border-light: #3a3025;
    --border: #4a3d2e;
    --text-muted: #5a4d3e;
    --text-tertiary: #8a7a62;
    --text-secondary: #b8a888;
    --text-body: #d4c4a8;
    --text-primary: #f0e6d6;
    --accent-light: #3d3020;
    --accent: #d4a24c;
    --success: #7cb342;
    --danger: #e57373;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 10px -3px rgba(0, 0, 0, 0.3);
    --milestone-bg: #332a1f;
    --milestone-border: #4a3d2e;
    --milestone-name-color: #d4c4a8;
    --milestone-achieved-bg: #2a3318;
    --milestone-achieved-border: #5a7a2e;
    --milestone-achieved-shadow: rgba(124, 179, 66, 0.25);
    --milestone-inactive-bg: #2a2118;
    --milestone-inactive-border: #3a3025;
    --milestone-inactive-name: #8a7a62;
    --toast-error-bg: #3d2018;
    --toast-error-border: #6a3020;
    --toast-error-color: #e57373;
    --dropdown-bg: #2a2118;
    --dropdown-border: #5a4d3e;
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --progress-track: #3a3025;
    --progress-fill: #5a7a2e;
}

[data-theme="israel"] {
    --bg: #edf2ff;
    --surface: #ffffff;
    --surface-alt: #f0f5ff;
    --border-light: #dce8ff;
    --border: #b8d0f8;
    --text-muted: #c5d8fa;
    --text-tertiary: #6e8fd4;
    --text-secondary: #3f5ba8;
    --text-body: #1a3070;
    --text-primary: #0d2152;
    --accent-light: #dce8ff;
    --accent: #0038b8;
    --success: #059669;
    --danger: #e11d48;
    --shadow-sm: 0 1px 2px 0 rgba(0, 56, 184, 0.08);
    --shadow-card: 0 2px 10px -3px rgba(0, 56, 184, 0.1);
    --milestone-bg: #f0f5ff;
    --milestone-border: #b8d0f8;
    --milestone-name-color: #1a3070;
    --milestone-achieved-bg: #dce8ff;
    --milestone-achieved-border: #7faaf5;
    --milestone-achieved-shadow: rgba(0, 56, 184, 0.15);
    --milestone-inactive-bg: #f0f5ff;
    --milestone-inactive-border: #c5d8fa;
    --milestone-inactive-name: #6e8fd4;
    --toast-error-bg: #fff1f2;
    --toast-error-border: #fecdd3;
    --toast-error-color: #be123c;
    --dropdown-bg: #fff;
    --dropdown-border: #b8d0f8;
    --overlay-bg: rgba(13, 33, 82, 0.45);
    --progress-track: #b8d0f8;
    --progress-fill: #0038b8;
}

#il-confetti-field {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    filter: blur(1.5px);
}

[data-theme="israel"] #il-confetti-field {
    display: block;
}

.il-flag-piece {
    position: absolute;
    top: -40px;
    left: var(--x);
    opacity: var(--opacity);
    will-change: transform;
    animation: il-fall var(--dur) var(--delay) linear infinite;
}

.il-flag-piece img {
    width: 30px;
    height: 20px;
    display: block;
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

@keyframes il-fall {
    from { transform: translateY(0) rotate(var(--rot-start)); }
    to   { transform: translateY(calc(100vh + 60px)) rotate(var(--rot-end)); }
}

.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
    transition: none !important;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: background 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
    background: var(--surface-alt);
    border-color: var(--text-muted);
}
