:root {
  --green: #16a34a; --green-light: #22c55e; --green-dark: #15803d;
  --bg: #0a0a0a; --bg2: #1e1e1e; --bg3: #2a2a2a;
  --text: #e0e0e0; --text2: #888888; --border: #3a3a3a; --red: #ef4444;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* SPLASH */
.splash-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.splash-overlay.hidden { display: none; }

/* AUTH */
.hidden { display: none !important; }
.auth-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 1100; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 0; }
.auth-overlay.hidden { display: none; }
.auth-box { max-width: 420px; width: 90%; padding: 36px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; text-align: center; margin: auto; }
.auth-box h2 { font-size: 1.6rem; color: white; margin-bottom: 4px; }
.auth-box h2 span { color: var(--green-light); }
.auth-box .sub { color: var(--text2); font-size: 0.85rem; margin-bottom: 20px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg3); border-radius: 8px; padding: 4px; }
.auth-tab { flex: 1; padding: 10px; border: none; border-radius: 6px; background: transparent; color: var(--text2); font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.auth-tab.active { background: var(--green); color: white; }
.auth-form { text-align: left; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .form-group label { font-size: 0.8rem; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 4px; }
.auth-form .form-group input { width: 100%; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; }
.auth-form .form-group input:focus { outline: none; border-color: var(--green); }
.auth-error { color: var(--red); font-size: 0.8rem; min-height: 20px; margin-bottom: 8px; }
.btn-guest { margin-top: 12px; padding: 10px; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text2); font-size: 0.85rem; cursor: pointer; width: 100%; transition: all 0.2s; }
.btn-guest:hover { border-color: var(--green); color: var(--text); }
.disclaimer-box { text-align: left; font-size: 0.8rem; color: var(--text2); line-height: 1.5; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.disclaimer-box strong { color: var(--text); }
.disclaimer-box h4 { color: var(--green-light); margin-bottom: 6px; font-size: 0.85rem; }
.disclaimer-check { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text); cursor: pointer; margin-bottom: 14px; }
.disclaimer-check input { accent-color: var(--green); width: 18px; height: 18px; }
.thankyou-screen { text-align: center; }
.thankyou-icon { font-size: 3rem; color: var(--green-light); margin-bottom: 8px; }
.thankyou-message { text-align: left; font-size: 0.9rem; color: var(--text2); line-height: 1.7; margin-bottom: 20px; background: var(--bg3); border-radius: 10px; padding: 16px; }
.thankyou-message p { margin-bottom: 8px; }
.thankyou-message p:last-child { margin-bottom: 0; }
.tips-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
.tip-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: left; display: flex; gap: 14px; align-items: flex-start; }
.tip-num { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: white; font-weight: 900; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tip-title { font-weight: 700; color: white; font-size: 0.9rem; margin-bottom: 4px; }
.tip-text { font-size: 0.8rem; color: var(--text2); line-height: 1.5; }
.thankyou-footer { margin-top: 8px; font-size: 0.9rem; color: var(--text2); line-height: 1.5; }
.splash-box { max-width: 520px; width: 90%; padding: 40px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.splash-box h1 { font-size: 1.8rem; color: white; margin-bottom: 6px; }
.splash-box h1 span { color: var(--green-light); }
.splash-box .motto { color: var(--text2); font-size: 0.9rem; margin-bottom: 24px; font-style: italic; }
.splash-box .disclaimer { text-align: left; font-size: 0.82rem; color: var(--text2); line-height: 1.6; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 24px; }
.splash-box .disclaimer strong { color: var(--text); }
.splash-box .disclaimer h4 { color: var(--green-light); margin-bottom: 8px; font-size: 0.9rem; }
.splash-box label { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text); cursor: pointer; margin-bottom: 20px; }
.splash-box label input { accent-color: var(--green); width:  18px; height: 18px; }
.splash-box .btn-start { padding: 14px 40px; background: var(--green); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%; transition: 0.2s; }
.splash-box .btn-start:hover { background: var(--green-dark); }
.splash-box .btn-start:disabled { background: var(--bg3); color: var(--text2); cursor: not-allowed; }

/* PROFILE */
.profile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 900; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.profile-overlay.hidden { display: none; }
.profile-box { max-width: 480px; width: 90%; padding: 36px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; }
.profile-box h2 { font-size: 1.4rem; color: white; margin-bottom: 6px; }
.profile-box .sub { color: var(--text2); font-size: 0.85rem; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.8rem; color: var(-- text2); font-weight:  700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--green); }
.form-group select option { background: var(--bg3); color: var(--text); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.btn-profile { padding: 14px; background: var(--green); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%; margin-top: 6px; }
.btn-profile:hover { background: var(--green-dark); }

/* LAYOUT */
.app.hidden { display: none; }
.header { background: rgba(10,10,10,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.header h1 { font-size: 1.2rem; color: white; }
.header h1 span { color: var(--green-light); }
.header .date-nav { display: flex; align-items: center; gap: 12px; }
.header .date-nav button { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.header .date-nav button:hover { border-color: var(--green); }
.header .date-label { font-size: 0 .9rem; color: var(--green-light); font-weight: 700; min-width: 100px; text-align: center; }
.header-right { display: flex; align-items: center; gap: 16px; }
.profile-chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: 0.85rem; color: var(--text); }
.profile-chip:hover { border-color: var(--green); }
.profile-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-size: 0 .75rem; font-weight: 900; color: white; }
.profile-dropdown { position: absolute; top: 100%; right: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-width: 180px; box-shadow: 0 12px 24px rgba(0,0,0,0.5); display: none; z-index: 60; }
.profile-dropdown.show { display: block; }
.profile-dropdown button { display: block; width: 100%; padding: 10px 14px; background: none; border: none; color: var(--text); font-size: 0.85rem; text-align: left; cursor: pointer; border-radius: 6px; }
.profile-dropdown button:hover { background: var(--bg3); color: white; }
.tabs { display: flex; justify-content: center; gap: 4px; padding: 12px 24px; background: var(--bg2); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 10px 18px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--text2); background: transparent; border: none; border-bottom: 3px solid transparent; white-space: nowrap; transition: all 0.2s; }
.tab.active { color: var(--green-light); border-bottom-color: var(--green); background: rgba(22,163,74,0.08); }
.tab:hover { color: white; }
.main { max-width: 900px; margin: 0 auto; padding: 24px; }
.section { display: none; }
.section.active { display: block; }
.card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card h3 { font-size: 1 .1rem; color: white; margin-bottom: 8px; }
.card p { font-size: 0.9rem; color: var(--text2); line-height: 1.5; }
.card.highlight { border-color: var(--green); }

/* DASHBOARD */
.dash-hero { text-align: center; padding: 30px 20px; background: linear-gradient(135deg, var(--bg2), var(--bg3)); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 24px; }
.dash-hero .greeting { font-size: 1.6rem; font-weight: 900; color: white; }
.dash-hero .greeting span { color: var(--green-light); }
.dash-hero .date-display { font-size: 0 .9rem; color: var(--text2); margin-top: 6px; }
.dash-hero .streak { display: inline-block; margin-top: 12px; padding: 6px 16px; background: rgba(22,163 ,74,0.15); color: var(--green-light); border-radius:  20px; font-size: 0 .8rem; font-weight: 700; }
.dash-score { display: flex; align-items: center; justify-content: center; gap:  24px; margin: 24px 0; }
.score-ring { position: relative; width: 140px; height: 140px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .score-num { font-size: 2 .5rem; font-weight: 900; color: var(--green-light); line-height: 1; }
.score-ring .score-label { font-size: 0 .7rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0 .1em; }
.score-details { text-align: left; }
.score-details .score-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0 .85rem; }
.score-details .score-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.score-dot.done { background: var(--green-light); }
.score-dot.partial { background: #eab308; }
.score-dot.missed { background: var(--red); }
.score-dot.pending { background: var(--border); }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.2s; }
.dash-card:hover { border-color: var(--green); transform: translateY(-2px); }
.dash-card .dash-card-icon { font-size: 1.5rem; margin-bottom: 8px; }
.dash-card .dash-card-title { font-size: 0 .75rem; color: var(--text2); text-transform: uppercase; letter-spacing:  0.05em; margin-bottom: 6px; }
.dash-card .dash-card-value { font-size: 1 .4rem; font-weight: 900; color: white; }
.dash-card .dash-card-sub { font-size: 0 .8rem; color: var(--text2); margin-top: 4px; }
.dash-card .dash-card-bar { margin-top: 10px; background: var(--bg); border-radius:  6px; height:  6px; overflow: hidden; }
.dash-card .dash-card-bar .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green), var(--green-light)); transition: width 0 .3s; }
.dash-card.status-good { border-color: rgba(34,197,94,0.3); }
.dash-card.status-warn { border-color: rgba(234,179,8,0.3); }
.dash-card.status-bad { border-color: rgba(239,68,68,0.2); }
.dash-trend { background: var(--bg3); border: 1 px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.dash-trend h3 { font-size:  1rem; color: white; margin-bottom:  16px; }
.trend-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 4px; }
.trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.trend-bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--green); min-height: 4px; margin-top: auto; transition: height 0.3s; }
.trend-bar.today { background: var(--green-light); }
.trend-label { font-size: 0.65rem; color: var(--text2); }
.trend-value { font-size: 0.65rem; color: var(--text); font-weight: 700; }
.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.dash-action-btn { flex: 1; min-width: 140px; padding: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-align: center; cursor: pointer; font-size: 0 .85rem; font-weight: 700; transition: all 0.2s; }
.dash-action-btn:hover { border-color: var(--green); color: var(--green-light); }
.dash-action-btn .action-icon { font-size: 1 .3rem; display: block; margin-bottom: 6px; }

/* WORKOUT */
.workout-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.workout-header h2 { font-size: 1.3rem; color: white; }
.workout-badge { padding: 4px 12px; border-radius: 20px; font-size: 0 .75rem; font-weight: 700; text-transform: uppercase; }
.badge-green { background: rgba(22,163,74,0.15); color: var(--green-light); }
.badge-grey { background: rgba(107,114,128,0.15); color: #9ca3af; }
.exercise { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.exercise-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.exercise-name { font-weight: 700; color: white; font-size: 0.95rem; }
.exercise-detail { font-size: 0.8rem; color: var(--text2); margin-top: 4px; }
.exercise-check { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.exercise-check.done { background: var(--green); border-color: var(--green); }
.exercise-check.done::after { content: '\2713'; color: white; font-size: 14px; font-weight: 900; }
.set-log { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.set-log label { font-size: 0.75rem; color: var(--text2); font-weight: 600; text-transform: uppercase; }
.set-log input { width: 60px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.85rem; text-align: center; }
.set-log input:focus { outline: none; border-color: var(--green); }

/* NUTRITION */
.day-selector { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.day-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--text2); cursor: pointer; font-size: 0.8rem; font-weight: 700; transition: all 0.2s; }
.day-btn.active { border-color: var(--green); color: var(--green-light); background: rgba(22,163,74,0.08); }
.macro-bar { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.macro-item { flex: 1; min-width: 120px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; }
.macro-item h4 { font-size: 0.75rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.macro-value { font-size: 1.5rem; font-weight: 900; color: var(--green-light); }
.macro-target { font-size: 0.75rem; color: var(--text2); }
.meal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.meal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.meal-time { font-size: 0.8rem; color: var(--green-light); font-weight: 700; }
.meal-title { font-weight: 700; color: white; font-size: 0.95rem; }
.meal-food { font-size: 0.85rem; color: var(--text2); line-height: 1.6; margin-bottom: 8px; }
.meal-protein { display: inline-block; padding: 3px 10px; background: rgba(22,163,74,0.1); color: var(--green-light); border-radius: 20px; font-size: 0.75rem; font-weight: 700; }

/* SUPPLEMENTS */
.supplement-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.supplement-time { font-size: 0.75rem; color: var(--green-light); font-weight: 700; min-width: 80px; }
.supplement-name { font-size: 0.9rem; color: white; flex: 1; }
.supplement-notes { font-size: 0.75rem; color: var(--text2); }
.supplement-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.supplement-check.done { background: var(--green); border-color: var(--green); }
.supplement-check.done::after { content: '\2713'; color: white; font-size: 12px; font-weight: 900; }

/* STEPS */
.steps-tracker { text-align: center; padding: 40px 20px; }
.steps-number { font-size: 4rem; font-weight: 900; color: var(--green-light); line-height: 1; }
.steps-label { font-size: 1rem; color: var(--text2); margin-top: 8px; }
.steps-input-wrap { margin-top: 24px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.steps-input-wrap input { width: 160px; padding: 12px 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1.2rem; text-align: center; font-weight: 700; }
.steps-input-wrap input:focus { outline: none; border-color: var(--green); }
.steps-input-wrap button { padding: 12px 24px; background: var(--green); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
.steps-input-wrap button:hover { background: var(--green-dark); }
.steps-bar-wrap { margin-top: 24px; background: var(--bg3); border-radius: 10px; height: 24px; overflow: hidden; }
.steps-bar { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-light)); border-radius: 10px; transition: width 0.5s ease; }
.steps-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.step-block { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.step-block h4 { color: white; font-size: 0.85rem; margin-bottom: 4px; }
.step-block .target { color: var(--green-light); font-weight: 700; font-size: 0.8rem; }
.step-block .desc { color: var(--text2); font-size: 0.75rem; margin-top: 4px; }

/* PRIMER */
.primer-exercise { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.primer-info { flex: 1; }
.primer-name { font-weight: 700; color: white; font-size: 0.85rem; }
.primer-detail { font-size: 0.75rem; color: var(--text2); }

/* GROCERY */
.grocery-section { margin-top: 24px; }
.grocery-section h3 { font-size: 1rem; color: white; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.grocery-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.grocery-item input[type="checkbox"] { accent-color: var(--green); width: 16px; height: 16px; }
.grocery-item label { font-size: 0.85rem; color: var(--text); }

/* STATS */
.stats-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 900; color: var(--green-light); }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.stat-card .stat-change { font-size: 0.8rem; margin-top: 6px; font-weight: 700; }
.stat-change.down { color: var(--green-light); }
.stat-change.up { color: var(--red); }
.stat-change.neutral { color: var(--text2); }
.log-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 24px; }
.log-form .form-field { flex: 1; min-width: 120px; }
.log-form .form-field label { display: block; font-size: 0.75rem; color: var(--text2); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; }
.log-form .form-field input { width: 100%; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; text-align: center; }
.log-form .form-field input:focus { outline: none; border-color: var(--green); }
.log-form button { padding: 10px 24px; background: var(--green); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; height: 42px; }
.log-form button:hover { background: var(--green-dark); }
.history-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.history-table th { font-size: 0.75rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.history-table td { padding: 10px 12px; font-size: 0.9rem; border-bottom: 1px solid rgba(58,58,58,0.3); }
.history-table tr:hover td { background: rgba(22,163,74,0.04); }
.history-table .del-btn { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; }
.history-table .del-btn:hover { color: var(--red); background: rgba(239,68,68,0.1); }

/* CHALLENGES */
.challenge-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.challenge-filter-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--text2); cursor: pointer; font-size: 0.8rem; font-weight: 700; transition: all 0.2s; }
.challenge-filter-btn.active { border-color: var(--green); color: var(--green-light); background: rgba(22,163,74,0.08); }
.challenge-filter-btn:hover { border-color: var(--green); color: white; }
.challenge-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; transition: all 0.2s; }
.challenge-card:hover { border-color: rgba(34,197,94,0.3); }
.challenge-card.challenge-complete { border-color: var(--green-light); background: rgba(22,163,74,0.06); animation: challengePulse 2s infinite; }
@keyframes challengePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.2); } 50% { box-shadow: 0 0 12px 4px rgba(34,197,94,0.15); } }
.challenge-top { display: flex; align-items: flex-start; gap: 14px; }
.challenge-icon { font-size: 2rem; flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--bg3); border-radius: 10px; }
.challenge-info { flex: 1; }
.challenge-name { font-weight: 700; color: white; font-size: 1rem; }
.challenge-desc { font-size: 0.82rem; color: var(--text2); margin-top: 4px; line-height: 1.5; }
.challenge-meta { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.challenge-difficulty { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.challenge-goal { font-size: 0.75rem; color: var(--text2); }
.challenge-category { font-size: 0.7rem; color: var(--text2); padding: 2px 8px; background: var(--bg3); border-radius: 10px; }
.challenge-progress-wrap { margin-top: 14px; }
.challenge-progress-bar { height: 10px; background: var(--bg); border-radius: 10px; overflow: hidden; }
.challenge-progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-light)); border-radius: 10px; transition: width 0.5s ease; }
.challenge-progress-text { font-size: 0.8rem; color: var(--text2); margin-top: 6px; font-weight: 600; }
.challenge-join-btn { padding: 10px 20px; background: var(--green); color: white; border: none; border-radius: 8px; font-weight: 700; font-size: 0.85rem; cursor: pointer; flex-shrink: 0; transition: all 0.2s; align-self: center; }
.challenge-join-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.challenge-abandon-btn { background: none; border: 1px solid var(--border); color: var(--text2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; transition: all 0.2s; }
.challenge-abandon-btn:hover { border-color: var(--red); color: var(--red); background: rgba(239,68,68,0.1); }
.challenge-claim-btn { padding: 10px 24px; background: linear-gradient(135deg, var(--green), var(--green-light)); color: white; border: none; border-radius: 8px; font-weight: 700; font-size: 0.9rem; cursor: pointer; flex-shrink: 0; transition: all 0.2s; animation: claimGlow 1.5s infinite; }
.challenge-claim-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(34,197,94,0.3); }
@keyframes claimGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.3); } 50% { box-shadow: 0 0 16px 4px rgba(34,197,94,0.2); } }
.challenge-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.challenge-badge { background: var(--bg2); border: 1px solid rgba(34,197,94,0.3); border-radius: 12px; padding: 16px; text-align: center; transition: all 0.2s; }
.challenge-badge:hover { border-color: var(--green-light); transform: translateY(-2px); }
.challenge-badge-icon { font-size: 2rem; margin-bottom: 8px; }
.challenge-badge-name { font-size: 0.8rem; font-weight: 700; color: white; line-height: 1.3; }
.challenge-badge-date { font-size: 0.7rem; color: var(--green-light); margin-top: 4px; }

/* GUIDE */
.guide-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.guide-card p { color: var(--text2); font-size: 0.9rem; line-height: 1.6; }
.guide-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.guide-header h3 { color: white; font-size: 1.1rem; }
.guide-icon { background: var(--bg3); color: var(--green-light); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; letter-spacing: 0.05em; flex-shrink: 0; }
.guide-pillars { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.guide-pillar { display: flex; gap: 14px; align-items: flex-start; background: var(--bg3); border-radius: 10px; padding: 14px; }
.guide-pillar div { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }
.guide-pillar div strong { color: white; }
.pillar-num { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: white; font-weight: 900; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.guide-rules { display: flex; flex-direction: column; gap: 12px; }
.guide-rule { display: flex; gap: 14px; align-items: flex-start; }
.guide-rule div { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }
.guide-rule div strong { color: white; }
.rule-badge { background: var(--bg3); color: var(--green-light); font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.guide-tabs-list { display: flex; flex-direction: column; gap: 10px; }
.guide-tab-item { display: flex; gap: 14px; align-items: flex-start; background: var(--bg3); border-radius: 8px; padding: 12px; }
.guide-tab-item div { font-size: 0.82rem; color: var(--text2); line-height: 1.5; }
.guide-tab-item div strong { color: white; }
.tab-icon { background: var(--green); color: white; font-size: 0.65rem; font-weight: 800; padding: 4px 8px; border-radius: 5px; flex-shrink: 0; margin-top: 2px; letter-spacing: 0.03em; }

/* RESPONSIVE */
@media (max-width: 720px) { .stats-hero { grid-template-columns: repeat(2, 1fr); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .main { padding: 16px; } .tabs { padding: 8px 12px; gap: 2px; } .tab { padding: 8px 12px; font-size: 0.78rem; }
  .steps-number { font-size: 3rem; } .steps-input-wrap { flex-direction: column; }
  .macro-bar { gap: 8px; } .day-selector { gap: 6px; } .day-btn { padding: 6px 10px; font-size: 0.75rem; }
  .log-form { flex-direction: column; } .log-form button { width: 100%; }
  .dash-hero .greeting { font-size: 1.2rem; }
  .score-ring { width: 110px; height: 110px; }
  .score-ring .score-num { font-size: 2rem; }
  .dash-actions { flex-direction: column; }
  .challenge-badges { grid-template-columns: repeat(2, 1fr); }
  .challenge-top { flex-direction: column; align-items: center; text-align: center; }
  .challenge-meta { justify-content: center; }
}

/* FOOTER */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 32px 24px; margin-top: 40px; }
.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1rem; color: var(--text); margin-bottom: 16px; }
.footer-brand strong { color: var(--green-light); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text2); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--green-light); }
.footer-copy { font-size: 0.75rem; color: var(--text2); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: white; border: none; font-size: 1.1rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--green-dark); transform: translateY(-2px); }

@media (max-width: 620px) {
  .tabs { justify-content: flex-start; }
  .footer-links { gap: 16px; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }
}