/* 
 * Family TaskBot — Warm Luminous Nature & Family Design System
 * Atmosphere: Morning Sun over Green Hills, Cozy Home, Warmth & Vitality
 * Typography: Outfit / Playfair Display (Headers) & Plus Jakarta Sans / Inter (Body)
 */

:root {
    --sun-gold: #f59e0b;
    --sun-amber: #fbbf24;
    --sun-light: #fef3c7;
    --sun-glow: rgba(245, 158, 11, 0.25);
    
    --forest-emerald: #10b981;
    --forest-sage: #34d399;
    --forest-glow: rgba(16, 185, 129, 0.25);
    
    --warm-grad-sun: linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
    --warm-grad-hero: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
    --bg-main: linear-gradient(180deg, #10141b 0%, #141c1b 50%, #0d1214 100%);
    
    --card-bg: rgba(24, 30, 32, 0.65);
    --card-border: 1px solid rgba(255, 255, 255, 0.08);
    --card-border-gold: 1px solid rgba(251, 191, 36, 0.25);
    
    --text-ivory: #fbfcf8;
    --text-sand: #cbd5e1;
    --text-muted: #788a96;
    
    --shadow-soft: 0 10px 35px -5px rgba(0, 0, 0, 0.45);
    --shadow-sun: 0 8px 30px 0 rgba(245, 158, 11, 0.2);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-main);
    color: var(--text-ivory);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Natural Light Glows in Background */
body::before {
    content: '';
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 380px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.08) 50%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: 16px 16px 60px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* Nature Hero Banner */
.nature-banner-card {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    height: 160px;
    box-shadow: var(--shadow-soft);
    border: var(--card-border-gold);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px 20px;
    background-size: cover;
    background-position: center;
}

.nature-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 20, 27, 0.1) 0%, rgba(16, 20, 27, 0.85) 80%, rgba(16, 20, 27, 0.95) 100%);
    z-index: 1;
}

.nature-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.nature-banner-text h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.nature-banner-text p {
    font-size: 12px;
    color: #fef08a;
    font-weight: 500;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.header-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.header-refresh-btn:active {
    transform: scale(0.9);
}

/* Family Tabs Scroll Bar */
.family-tabs-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 2px;
}
.family-tabs-bar::-webkit-scrollbar {
    display: none;
}

.tab-pill {
    flex: 0 0 auto;
    background: rgba(30, 38, 40, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px 14px;
    color: var(--text-sand);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-pill:hover {
    color: #fff;
    border-color: rgba(251, 191, 36, 0.3);
}

.tab-pill.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(16, 185, 129, 0.3) 100%);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fff;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25);
    transform: translateY(-1px);
}

/* Warm Progress Card */
.progress-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--card-border-gold);
    border-radius: 22px;
    padding: 16px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.progress-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-title-block h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-title-block p {
    font-size: 12px;
    color: var(--text-sand);
    margin-top: 2px;
    font-weight: 500;
}

.progress-percent-badge {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 900;
    color: var(--sun-amber);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Sub-Filters / Status Switcher */
.status-bar {
    display: flex;
    background: rgba(26, 33, 35, 0.6);
    backdrop-filter: blur(14px);
    border: var(--card-border);
    border-radius: 16px;
    padding: 4px;
    gap: 4px;
}

.status-button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 8px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-button.active {
    background: rgba(245, 158, 11, 0.18);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-button.active-done {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.counter-chip {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
}

/* Search Bar */
.search-container {
    position: relative;
    width: 100%;
}

.search-field {
    width: 100%;
    height: 42px;
    background: rgba(26, 33, 35, 0.65);
    border: var(--card-border);
    border-radius: 14px;
    padding: 0 14px 0 38px;
    font-family: var(--font-body);
    font-size: 13px;
    color: #fff;
    outline: none;
    transition: all 0.2s ease;
}
.search-field:focus {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 40, 42, 0.85);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

/* Warm Primary Action Button */
.btn-warm-action {
    background: var(--warm-grad-sun);
    border: none;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    padding: 13px 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sun);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-warm-action:active {
    transform: scale(0.96);
}

/* Task Item Card (Organic, Warm & Clickable) */
.task-card-nature {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--card-border);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.task-card-nature:hover {
    border-color: rgba(251, 191, 36, 0.25);
    transform: translateY(-1px);
}
.task-card-nature:active {
    transform: scale(0.98);
}
.task-card-nature.done {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

/* Leaf / Flower Checkbox */
.leaf-checkbox {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    color: transparent;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.leaf-checkbox.checked {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}

.task-info-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-headline {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-ivory);
    font-weight: 500;
    word-break: break-word;
}
.task-headline.strike {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.family-member-tag {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.3);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}
.family-member-tag:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: scale(1.04);
}

.task-date-text {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modals with Warm Cozy Backdrop */
.cozy-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 14, 0.82);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cozy-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cozy-modal-sheet {
    width: 100%;
    max-width: 480px;
    background: #151b1e;
    border: var(--card-border-gold);
    border-radius: 28px 28px 0 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}
.cozy-modal-backdrop.open .cozy-modal-sheet {
    transform: translateY(0);
}
