:root {
    /* ===== Warm Gradient Palette ===== */
    /* Orange→Pink Scale */
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;

    /* Purple→Blue Scale */
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;

    /* Yellow→Coral Scale */
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --coral-400: #fb7185;
    --coral-500: #f43f5e;
    --coral-600: #e11d48;

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, var(--orange-500) 0%, var(--pink-500) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--purple-500) 0%, var(--blue-500) 100%);
    --gradient-accent: linear-gradient(135deg, var(--yellow-500) 0%, var(--coral-500) 100%);

    /* ===== Semantic Colors ===== */
    --primary: #f97316;
    --primary-light: #fb923c;
    --primary-dark: #ea580c;
    --accent: #ec4899;
    --danger: #f43f5e;
    --success: #10b981;

    --background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fef3c7 100%);
    --surface: #ffffff;
    --surface-elevated: rgba(255, 255, 255, 0.95);
    --surface-glass: rgba(255, 255, 255, 0.7);

    --text: #1c1917;
    --text-light: #78716c;
    --text-primary: #0c0a09;
    --text-secondary: #44403c;
    --text-tertiary: #78716c;

    --border: rgba(251, 146, 60, 0.15);

    /* ===== Colorful Shadows ===== */
    --shadow-sm: 0 2px 8px rgba(249, 115, 22, 0.08);
    --shadow-md: 0 4px 16px rgba(249, 115, 22, 0.12);
    --shadow-lg: 0 8px 32px rgba(249, 115, 22, 0.16);
    --shadow-orange: 0 8px 24px rgba(249, 115, 22, 0.3);
    --shadow-pink: 0 8px 24px rgba(236, 72, 153, 0.3);
    --shadow-purple: 0 8px 24px rgba(168, 85, 247, 0.3);
    --focus-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
    --hover-shadow: 0 12px 32px rgba(249, 115, 22, 0.4), 0 0 0 rgba(236, 72, 153, 0.2);
    --hover-shadow-lg: 0 12px 32px rgba(249, 115, 22, 0.4);

    /* ===== Typography ===== */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* ===== Spacing ===== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* ===== Border Radius ===== */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* ===== Transitions ===== */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2);
    }
}

@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes celebrate {
    0% {
        transform: scale(1) rotate(0deg);
    }
    15% {
        transform: scale(1.2) rotate(-5deg);
    }
    30% {
        transform: scale(1.1) rotate(5deg);
    }
    45% {
        transform: scale(1.15) rotate(-3deg);
    }
    60% {
        transform: scale(1.05) rotate(2deg);
    }
    75% {
        transform: scale(1.08) rotate(-1deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ============ SCREENS ============ */
.screen {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.screen.active {
    display: flex;
}

/* ============ HEADER ============ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--orange-500), var(--pink-500), transparent);
    opacity: 0.5;
}

.header-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.header-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    border-radius: var(--radius-md);
    transition: opacity var(--transition-base);
}

.header-btn:hover::before {
    opacity: 0.08;
}

.header-btn:active {
    transform: scale(0.95);
}

.header-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}

.header-stats {
    padding: 12px 16px;
}

.header-stats-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.stat-compact {
    white-space: nowrap;
}

.stat-compact strong {
    color: var(--primary);
    font-weight: 700;
}

.stat-divider {
    color: var(--text-light);
}

.header-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--orange-600);
}

.fire-icon {
    font-size: 16px;
}

.streak-count {
    min-width: 16px;
    text-align: center;
}

.back-btn {
    font-size: 20px;
}

/* ============ ENTRY SCREEN ============ */
.entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
}

.app-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xl);
    letter-spacing: -1px;
    line-height: 1.1;
    animation: fadeInUp 600ms var(--transition-spring) backwards;
}

.input-group {
    margin-bottom: var(--space-md);
    animation: fadeInUp 600ms var(--transition-spring) 100ms backwards;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 18px var(--space-md);
    font-size: 16px;
    font-family: var(--font-body);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-shadow), var(--shadow-md);
    transform: translateY(-1px);
}

.input-group input::placeholder {
    color: var(--text-tertiary);
}

/* ============ QUICK CATEGORY CHIPS ============ */
.quick-categories {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
    animation: fadeInUp 600ms var(--transition-spring) 150ms backwards;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 12px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-base);
    flex-shrink: 0;
    color: var(--text-secondary);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
    background: var(--orange-50);
}

.category-chip.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-orange);
    transform: translateY(-2px);
}

.add-btn {
    width: 100%;
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-display);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    margin-top: var(--space-sm);
    transition: all var(--transition-spring);
    box-shadow: var(--shadow-orange);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    animation: fadeInUp 600ms var(--transition-spring) 200ms backwards;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 600ms, height 600ms;
}

.add-btn:active::before {
    width: 300px;
    height: 300px;
}

.add-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

.add-btn:active {
    transform: scale(0.98);
}

.repeat-btn {
    padding: 18px;
    font-size: 24px;
    font-weight: 600;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.repeat-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.repeat-btn:active {
    transform: scale(0.98);
}

.repeat-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mini-stats {
    margin-top: auto;
    text-align: center;
    padding: var(--space-lg);
    background: var(--surface-glass);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    animation: fadeInUp 600ms var(--transition-spring) 300ms backwards;
}

#mini-stats-text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 100;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

/* ============ STATS SCREEN ============ */
.stats-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.stats-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-spring);
    animation: scaleIn 400ms var(--transition-spring) backwards;
}

.stat-item:nth-child(1) { animation-delay: 0ms; }
.stat-item:nth-child(2) { animation-delay: 50ms; }
.stat-item:nth-child(3) { animation-delay: 100ms; }
.stat-item:nth-child(4) { animation-delay: 150ms; }

.stat-item:hover {
    border-color: var(--primary);
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-orange);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.streak-display {
    text-align: center;
    padding: var(--space-xl);
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.3);
}

.streak-display .fire {
    font-size: 24px;
    display: inline-block;
    animation: flicker 2s ease-in-out infinite;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-bar {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
}

.category-name {
    width: 80px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.category-bar-bg {
    flex: 1;
    height: 28px;
    background: var(--orange-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 var(--space-md);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-bar-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.category-count {
    width: 30px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.trend-display {
    text-align: center;
    padding: var(--space-md);
    font-size: 16px;
    font-weight: 500;
}

.trend-up {
    color: var(--success);
    font-weight: 600;
}
.trend-down {
    color: var(--coral-600);
    font-weight: 600;
}

/* ============ MENU OVERLAY ============ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 100;
}

.menu-overlay.show {
    display: block;
}

.menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    padding: 20px 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: var(--background);
}

.menu-item span {
    margin-right: 12px;
}

/* ============ VIEW ALL SCREEN ============ */
.list-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.date-group {
    margin-bottom: 24px;
}

.date-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.mitzvah-item {
    background: var(--surface);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
}

.mitzvah-item:hover {
    background: #f0f4f2;
}

.mitzvah-title {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
}

.mitzvah-meta {
    font-size: 13px;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* ============ EDIT MODAL ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.modal-btn.save {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
}

.modal-btn.delete {
    background: var(--danger);
    color: white;
    font-weight: 600;
}

.modal-btn.cancel {
    background: var(--orange-100);
    color: var(--text);
    font-weight: 600;
}

.modal-btn.accept {
    background: var(--gradient-primary);
    color: white;
    width: 100%;
    font-weight: 700;
    font-size: 17px;
}

.tos-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.tos-summary ul {
    margin: 15px 0;
    padding-left: 20px;
}

.tos-summary li {
    margin-bottom: 10px;
}

.tos-summary a {
    color: var(--primary);
}

/* ============ INSTALL BANNER ============ */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    display: none;
    z-index: 150;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.install-banner.show {
    display: block;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.install-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
}

.install-banner-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
}

.install-banner-subtitle {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

.install-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.install-btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

.install-dismiss {
    padding: 8px;
    font-size: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.install-dismiss:hover {
    color: var(--text);
}

/* iOS-specific install instructions */
.install-ios-steps {
    font-size: 13px;
    color: var(--text);
    margin-top: 8px;
    padding: 10px;
    background: var(--background);
    border-radius: 8px;
}

.install-ios-steps code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
}

/* ============ SETTINGS SCREEN ============ */
.settings-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.settings-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.category-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.category-list-item:last-child {
    border-bottom: none;
}

.delete-category-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.add-category-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.add-category-row input {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.add-category-row button {
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.export-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

/* ============ LEADERBOARD SCREEN ============ */
.status-banner {
    padding: 12px 20px;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.status-banner.status-success {
    background: #d4edda;
    color: #155724;
}

.status-banner.status-ok {
    background: #d1ecf1;
    color: #0c5460;
}

.status-banner.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-banner.status-info {
    background: #e7f3ff;
    color: #004085;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.leaderboard-entry .rank {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 40px;
}

.leaderboard-entry .flag {
    font-size: 28px;
}

.leaderboard-entry .user-info {
    flex: 1;
}

.leaderboard-entry .user-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.leaderboard-entry .user-stats {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.leaderboard-entry .streak {
    color: var(--primary);
}

/* ============ ERROR FEEDBACK ============ */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake-error {
    animation: shake 0.3s ease-in-out;
    border-color: #e74c3c !important;
}

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 50;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    color: var(--text-tertiary);
}

.nav-item:hover {
    background: var(--orange-50);
    color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
    background: var(--orange-50);
}

.nav-icon {
    font-size: 24px;
    line-height: 1;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Adjust screens to account for bottom nav */
.screen {
    padding-bottom: 80px;
}

/* ============ SUPPORT LINK ============ */
.support-link {
    display: block;
    text-align: center;
    margin-top: var(--space-lg);
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.support-link:hover {
    color: var(--primary);
    background: var(--orange-50);
}

/* ===== ONBOARDING OVERLAY ===== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-overlay.show {
    display: flex;
}

.onboarding-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 40px 30px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: onboardingSlideUp 0.3s ease-out;
}

@keyframes onboardingSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.onboarding-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
}

.onboarding-title {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 15px;
    color: var(--text);
}

.onboarding-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 30px;
}

.onboarding-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all var(--transition-base);
    cursor: pointer;
}

.onboarding-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.onboarding-buttons {
    display: flex;
    gap: 12px;
}

.onboarding-skip {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-base);
}

.onboarding-skip:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.onboarding-next {
    flex: 2;
    padding: 12px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-orange);
}

.onboarding-next:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow-lg);
}

.onboarding-next:active {
    transform: translateY(0);
}

/* ===== SWIPE TO DELETE ===== */
.mitzvah-item-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.mitzvah-item-content {
    position: relative;
    z-index: 2;
    background: var(--surface);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.mitzvah-item-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: var(--danger);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1;
}

.mitzvah-item-delete span:first-child {
    font-size: 20px;
}

.mitzvah-item-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
