:root {
    --bg-main: #000000;
    --bg-card: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --accent: #0a84ff;
    --accent-hover: #0060d1;
    --success: #30d158;
    --danger: #ff453a;
    --border: #38383a;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; }
body { background: var(--bg-main); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.screen { min-height: 100vh; display: flex; flex-direction: column; }
.mt-15 { margin-top: 15px; }

/* Auth */
#auth-screen { justify-content: center; align-items: center; padding: 20px; }
.auth-box { width: 100%; max-width: 340px; text-align: center; }
.auth-box h1 { font-size: 42px; font-weight: 800; letter-spacing: -1px; margin-bottom: 5px; }
.auth-box p { color: var(--text-secondary); margin-bottom: 30px; }
.auth-box input { width: 100%; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); color: white; border-radius: 12px; margin-bottom: 15px; font-size: 16px; outline: none; }
.auth-box input:focus { border-color: var(--accent); }
.error { background: rgba(255,69,58,0.2); color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.btn-primary { width: 100%; padding: 16px; background: var(--accent); color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { width: 100%; padding: 16px; background: transparent; color: var(--text-secondary); border: none; font-size: 16px; cursor: pointer; margin-top: 5px; }
.btn-danger { width: 100%; padding: 16px; background: rgba(255,69,58,0.1); color: var(--danger); border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }

/* App Layout */
.app-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-end; background: rgba(28,28,30,0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.app-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.date-display { color: var(--text-secondary); font-size: 14px; font-weight: 600; text-transform: uppercase; }

.content-area { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 90px; }

/* Tabs */
.tab-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & UI Elements */
.card { background: var(--bg-card); border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 15px; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.card-header .icon { font-size: 24px; }
.card-header h3 { margin: 0; }

.recalc-box { background: linear-gradient(145deg, #1c1c1e, #2c2c2e); padding: 20px; border-radius: 16px; margin-bottom: 25px; border: 1px solid var(--border); }
.recalc-box h3 { font-size: 18px; margin-bottom: 5px; }
.recalc-box p { font-size: 14px; color: var(--text-secondary); margin-bottom: 15px; }
.input-group input { width: 100%; padding: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px; color: white; margin-bottom: 10px; }
.btn-action { width: 100%; padding: 14px; background: linear-gradient(90deg, #8a2be2, #4169e1); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* Generated Lists */
.list-container { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.list-item { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 12px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; }
.item-main { font-weight: 600; font-size: 15px; }
.item-sub { color: var(--accent); font-size: 14px; font-weight: 600; }
.duration { color: var(--text-secondary); font-size: 14px; }

.btn-success { width: 100%; padding: 18px; background: var(--success); color: #000; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 10px; }

/* Loading */
.loading-indicator { text-align: center; padding: 40px 0; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Profile Form */
#profile-form label { display: block; color: var(--text-secondary); font-size: 13px; margin-bottom: 5px; margin-top: 15px; }
#profile-form input, #profile-form select { width: 100%; padding: 14px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px; color: white; font-size: 16px; }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(28,28,30,0.9); backdrop-filter: blur(20px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 15px 0 25px 0; z-index: 100; }
.nav-item { background: none; border: none; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav-item.active { color: var(--accent); }
