:root {
    --bg-color: #0c0c0c;
    --card-bg: rgba(30,30,30, 0.7);
    --accent-color: #E8761A;
    --text-primary: #ffffff;
    --text-secondary: #d1d1d1;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-heavy: rgba(255, 255, 255, 0.15);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(80px + var(--safe-area-bottom));
    position: relative;
}

header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: #0c0c0c !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 24px;
    border-bottom: 1px solid var(--glass-heavy);
}

.screen {
    padding-top: 10px; /* Space between header and first card */
    animation: fadeIn 0.4s ease-out forwards;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.plan-tag {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 24px;
    margin: 0 20px 20px 20px;
    border: 1px solid var(--glass-heavy);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.overlay-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(12,12,12,0.4) 0%, rgba(12,12,12,0.9) 70%, rgba(12,12,12,1) 100%);
    z-index: -1;
}

/* Category Pills */
.pill-container {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pill {
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--glass-heavy);
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

input.pill, select.pill {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid var(--glass-heavy) !important;
}

select.pill option {
    background: #111;
    color: white;
}

.pill.active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.card h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 20px 20px 20px;
}

.stat-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--glass);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.coach-section {
    background: linear-gradient(135deg, #2c1a0a 0%, #1e1e1e 100%);
    overflow: hidden;
}

nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    padding: 15px 10px calc(15px + var(--safe-area-bottom));
    border-top: 1px solid var(--glass);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
}

.nav-item.active {
    color: var(--accent-color);
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.btn-upgrade {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 15px;
    cursor: pointer;
}

.screen {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.calendar-day {
    aspect-ratio: 1/1;
    background: var(--glass);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.calendar-day.completed {
    background: #4CAF50;
    color: white;
    font-weight: 700;
}

.calendar-day.today {
    border: 1px solid var(--accent-color);
}
.hidden { display: none !important; }

.ads-banner {
    background: #2a2a2a;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #444;
    margin: 20px;
    border-radius: 10px;
    text-transform: uppercase;
}
