/* ============================================
   30 DAYS RAMADAN CHALLENGE - DESIGN SYSTEM
   Powered by Abdirahman Abdikariim
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=Amiri:wght@400;700&display=swap');

/* ============ CSS VARIABLES ============ */
:root {
    /* Primary Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.06);

    /* Accent Colors */
    --gold: #d4a843;
    --gold-light: #f0d080;
    --gold-dark: #b8902a;
    --green: #10b981;
    --green-light: #34d399;
    --teal: #14b8a6;
    --purple: #8b5cf6;
    --purple-light: #a78bfa;
    --blue: #3b82f6;
    --red: #ef4444;
    --red-soft: #f87171;
    --orange: #f59e0b;
    --pink: #ec4899;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(212, 168, 67, 0.3);

    /* Shadows */
    --shadow-gold: 0 0 40px rgba(212, 168, 67, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);

    /* Spacing */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ============ RESET ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============ APP SHELL ============ */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ============ SCREENS ============ */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.4s ease;
    position: relative;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* ============ BACKGROUND DECORATION ============ */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-crescent {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: inset -30px -10px 0 0 var(--gold);
    opacity: 0.08;
    animation: floatSlow 10s ease-in-out infinite;
}

.bg-star-decor {
    position: absolute;
    color: var(--gold);
    opacity: 0.06;
    font-size: 1.5rem;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-10px, 15px) rotate(5deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.04;
    }

    50% {
        opacity: 0.12;
    }
}

/* ============ SPLASH SCREEN ============ */
.splash-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 30px;
    background: radial-gradient(ellipse at center top, rgba(212, 168, 67, 0.08), transparent 60%);
}

.splash-crescent {
    font-size: 6rem;
    animation: floatSlow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.4));
}

.splash-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.splash-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
}

.splash-start-btn {
    margin-top: 20px;
    padding: 16px 50px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: var(--radius-md);
    color: #0a0e1a;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 25px rgba(212, 168, 67, 0.35);
}

.splash-start-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 35px rgba(212, 168, 67, 0.5);
}

/* About Card Styling */
.about-card {
    max-width: 380px;
    margin: 10px auto 20px;
    /* Reduced top margin from 25px to 10px */
    padding: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: var(--radius-md);
    text-align: center;
    backdrop-filter: blur(5px);
}

.about-title {
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 12px;
}

.about-text {
    font-size: 0.95rem;
    /* Larger font size as requested */
    color: #cbd5e1;
    /* Single color as requested */
    line-height: 1.8;
}

@media (max-width: 400px) {
    .about-card {
        padding: 16px;
        margin: 10px auto;
        /* Reduced from 15px */
    }

    .about-text {
        font-size: 0.88rem;
    }
}

/* Global Footer Support & Copyright */
.global-footer-wrapper {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 auto;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.support-footer {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 40px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.whatsapp-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: var(--text-primary);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.whatsapp-mini-btn:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: #25D366;
    transform: translateY(-1px);
}

.whatsapp-icon {
    width: 0.7em;
    /* Small like letter 'o' */
    height: 0.7em;
    fill: #25D366 !important;
    flex-shrink: 0;
    vertical-align: baseline;
    margin-right: 4px;
}

.global-copyright {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    pointer-events: none;
}

.copyright-badge {
    background: rgba(17, 24, 39, 0.8);
    /* Darker background for contrast */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    padding: 8px 20px;
    /* Slightly larger padding */
    border-radius: 40px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    /* Slightly larger font */
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.copyright-badge span {
    color: var(--gold-light);
    font-weight: 700;
}

/* Position adjustment when bottom nav is active */
body:has(.bottom-nav:not(.hidden)) .global-footer-wrapper {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 75px);
}

body:has(.bottom-nav:not(.hidden)) .copyright-badge {
    transform: scale(0.9);
    background: rgba(10, 14, 26, 0.6);
}

/* Specifically for screens that might be too long */
.screen {
    padding-bottom: 80px;
    /* Ensure space for global copyright */
}

body:has(.bottom-nav:not(.hidden)) .screen {
    padding-bottom: 140px;
    /* Space for both global copyright and bottom nav */
}

/* ============ ONBOARDING - MODE SELECTION ============ */
.onboard-header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 0.5s ease;
}

.onboard-step {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
    width: 28px;
    border-radius: 5px;
}

.onboard-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.onboard-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mode Cards */
.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    animation: slideUp 0.6s ease 0.2s both;
}

.mode-card {
    padding: 24px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 18px;
}

.mode-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.mode-card.selected {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.08);
    box-shadow: var(--shadow-gold);
}

.mode-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.mode-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============ ONBOARDING - HABIT SELECTION ============ */
.habits-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    animation: slideUp 0.5s ease 0.15s both;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 5px;
}

.habits-grid::-webkit-scrollbar {
    width: 4px;
}

.habits-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.habit-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.habit-option:hover {
    background: var(--bg-card-hover);
}

.habit-option.selected {
    border-color: var(--green);
    background: rgba(16, 185, 129, 0.08);
}

.habit-check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.habit-option.selected .habit-check {
    background: var(--green);
    border-color: var(--green);
}

.habit-emoji {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.habit-details {
    flex: 1;
}

.habit-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.habit-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.habit-type-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-yesno {
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple-light);
}

.badge-number {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue);
}

.habit-count-info {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid var(--border-gold);
    font-size: 0.85rem;
    color: var(--gold-light);
}

/* ============ GROUP JOIN ============ */
.group-section {
    margin-top: 20px;
    animation: slideUp 0.5s ease 0.2s both;
}

.group-choice {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.group-choice-btn {
    flex: 1;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.group-choice-btn:hover {
    background: var(--bg-card-hover);
}

.group-choice-btn.active {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.1);
    color: var(--gold-light);
}

.room-code-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 6px;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s ease;
}

.room-code-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.15);
}

.room-code-input::placeholder {
    letter-spacing: 2px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.room-code-display {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border: 1.5px dashed var(--border-gold);
    border-radius: var(--radius-md);
    margin-top: 15px;
}

.room-code-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 8px;
}

.room-code-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ============ NAME INPUT ============ */
.name-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.name-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.1);
}

.name-input::placeholder {
    color: var(--text-muted);
}

/* ============ BUTTONS ============ */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    border-radius: var(--radius-md);
    color: #0a0e1a;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(212, 168, 67, 0.45);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    color: var(--text-primary);
}

/* ============ DASHBOARD ============ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: slideDown 0.5s ease;
}

.greeting {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.greeting-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2px;
}

.greeting-name span {
    color: var(--gold);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Streak Card */
.streak-card {
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.12), rgba(212, 168, 67, 0.04));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease 0.1s both;
}

.streak-card::before {
    content: '🌙';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 5rem;
    opacity: 0.06;
}

.streak-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.streak-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mercy-pass {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--purple-light);
    font-weight: 500;
}

.streak-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.streak-fire {
    display: inline-block;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.streak-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.streak-sub strong {
    color: var(--gold-light);
}

/* Points row */
.points-badges-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease 0.2s both;
}

.mini-card {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.mini-card-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.mini-card-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.mini-card-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.points-value {
    color: var(--gold);
}

.badges-value {
    color: var(--purple-light);
}

/* Today Card */
.today-section {
    margin-bottom: 20px;
    animation: slideUp 0.5s ease 0.3s both;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.section-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.today-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.today-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.today-day-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.today-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.today-habits-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.habit-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    font-size: 0.8rem;
}

.habit-mini.done {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green-light);
}

.habit-mini.undone {
    color: var(--text-secondary);
}

.today-progress {
    margin-top: 15px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--green), var(--teal));
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============ CALENDAR VIEW ============ */
.calendar-section {
    animation: slideUp 0.5s ease 0.4s both;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-day-name {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 6px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.cal-day.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--green-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.cal-day.missed {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red-soft);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cal-day.today {
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
}

.cal-day.future {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.cal-day.mercy {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-light);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ============ DAILY CHECK-IN ============ */
.checkin-header {
    text-align: center;
    margin-bottom: 25px;
    animation: slideDown 0.5s ease;
}

.checkin-day {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.checkin-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.checkin-progress-ring {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.habits-checkin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.5s ease 0.2s both;
}

.checkin-habit {
    padding: 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.checkin-habit.checked {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.06);
}

.checkin-habit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkin-habit-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkin-habit-emoji {
    font-size: 1.6rem;
}

.checkin-habit-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.checkin-habit-points {
    font-size: 0.75rem;
    color: var(--gold);
}

/* Toggle switch for Yes/No */
.toggle-switch {
    width: 52px;
    height: 28px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch.on {
    background: var(--green);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

.toggle-switch.on::after {
    transform: translateX(24px);
}

/* Number input for count habits */
.number-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.num-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.num-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.num-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: var(--gold);
}

.num-target {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============ STATS SCREEN ============ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
}

.stat-card-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.habit-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.habit-stat-item:last-child {
    border-bottom: none;
}

.habit-stat-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.habit-stat-bar {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.habit-stat-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.habit-stat-pct {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* ============ BADGES DISPLAY ============ */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.badge-item {
    text-align: center;
    padding: 18px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.badge-item.earned {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.06);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.badge-title {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

/* ============ LEADERBOARD ============ */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leader-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.leader-item.me {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.06);
}

.leader-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.leader-rank.gold {
    color: var(--gold);
}

.leader-rank.silver {
    color: #c0c0c0;
}

.leader-rank.bronze {
    color: #cd7f32;
}

.leader-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.leader-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.leader-pts {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--gold);
    font-size: 0.9rem;
}

/* ============ SHARE CARD ============ */
.share-preview {
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #0f172a);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    text-align: center;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.share-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.05) 0%, transparent 60%);
    animation: rotateGlow 15s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.share-crescent {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    position: relative;
    z-index: 1;
}

.share-day-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    position: relative;
    z-index: 1;
}

.share-streak-text {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

.share-user-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.share-branding {
    margin-top: 20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.share-branding strong {
    color: var(--gold);
}

.share-actions {
    display: flex;
    gap: 10px;
}

.share-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-whatsapp {
    background: #25D366;
    color: white;
}

.share-download {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 12px 10px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: rgba(10, 14, 26, 0.92);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--gold);
}

.nav-icon {
    font-size: 1.3rem;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ TOAST NOTIFICATION ============ */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    max-width: 380px;
    width: 90%;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: white;
}

.toast-badge {
    background: rgba(139, 92, 246, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: white;
}

.toast-warning {
    background: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: white;
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ============ SETTINGS ============ */
.settings-group {
    margin-bottom: 20px;
}

.settings-group-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 5px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-item:hover {
    background: var(--bg-card-hover);
}

.settings-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-icon {
    font-size: 1.2rem;
}

.settings-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Utility */
.text-gold {
    color: var(--gold);
}

.text-green {
    color: var(--green);
}

.text-red {
    color: var(--red);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.gap-10 {
    gap: 10px;
}

.hidden {
    display: none !important;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Add bottom spacing for nav */
.screen-with-nav {
    padding-bottom: 90px;
}

/* ============ COMPACT QURAN READER ============ */
.quran-list-view {
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.surah-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.surah-card-compact {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.surah-card-compact:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
}

.surah-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.surah-card-num {
    width: 28px;
    height: 28px;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

.surah-card-info {
    display: flex;
    flex-direction: column;
}

.surah-card-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.surah-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.surah-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    color: var(--gold);
}

/* Reading View */
.quran-read-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

.btn-back-inline {
    background: transparent;
    border: none;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 0;
    cursor: pointer;
    text-align: left;
    margin-bottom: 5px;
}

.quran-content-scroll {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ayah-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.ayah-header h2 {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: var(--gold);
}

.ayah-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ayahs-box {
    display: flex;
    flex-direction: column;
    gap: 25px;
    direction: rtl;
}

.loader-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(212, 168, 67, 0.1);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    margin: 40px auto;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Add specialized button for habits interaction (Quran, Contacts) */
.quran-btn-inline {
    margin-top: 10px;
    padding: 10px 18px;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
}

.quran-btn-inline:hover {
    background: rgba(212, 168, 67, 0.2);
    border-color: var(--gold);
    transform: translateY(-1px);
}