* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #000; color: #fff; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
:root { --orange: #ff6b00; --blue: #0ea5e9; --purple: #8b5cf6; --green: #10b981; --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-top: env(safe-area-inset-top, 0px); }

.app { max-width: 430px; margin: 0 auto; min-height: 100dvh; background: #000; padding-bottom: calc(90px + var(--safe-bottom)); position: relative; }

/* ============ HEADER ============ */
.header { padding: 12px 16px; padding-top: calc(12px + var(--safe-top)); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: rgba(0,0,0,.96); backdrop-filter: blur(24px); z-index: 100; border-bottom: 1px solid #111; }
.menu-btn { background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px; }
.header-logo { display: flex; align-items: center; font-size: 20px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; background: linear-gradient(180deg, #fff 0%, #c0c0c0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px; }
.logo-x { width: 30px; height: 30px; display: inline-block; margin-left: -2px; margin-top: -4px; filter: drop-shadow(0 0 10px rgba(255,107,0,.9)); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: #151515; border: 1px solid #262626; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.notif-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: #ff3b30; border-radius: 50%; border: 2px solid #0a0a0a; }
.avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; cursor: pointer; border: 2px solid rgba(255,107,0,.7); box-shadow: 0 0 15px rgba(255,107,0,.5); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* SIDEBAR */
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; background: #0d0d0d; z-index: 300; transform: translateX(-100%); transition: transform .3s; border-right: 1px solid #1e1e1e; }
.sidebar.open { transform: translateX(0); }
.sidebar-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1e1e1e; font-weight: 900; letter-spacing: 2px; font-size: 12px; }
.sidebar-header button { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.sidebar-items { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-items button { background: none; border: none; color: #aaa; text-align: left; padding: 14px 16px; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sidebar-items button:active { background: rgba(255,107,0,.1); color: #ff6b00; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 250; }
.sidebar-overlay.hidden { display: none; }

/* ============ MAIN ============ */
.main { padding: 16px 18px 24px; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-title { margin-bottom: 16px; text-align: center; }
.page-title h2 { font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: 2px; font-family: 'Arial Black', Impact, sans-serif; }
.page-subtitle { font-size: 12px; color: #777; margin-top: 6px; }

/* ============ HERO INICIO ============ */
.hero { position: relative; padding: 8px 0 28px; min-height: 210px; }
.hero-athlete { position: absolute; top: -20px; right: -60px; width: 300px; height: 280px; background-image: url('https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=700&q=80&auto=format&fit=crop'); background-size: cover; background-position: center top; opacity: .85; pointer-events: none; z-index: 0; -webkit-mask-image: radial-gradient(ellipse at 55% 40%, black 25%, transparent 68%); mask-image: radial-gradient(ellipse at 55% 40%, black 25%, transparent 68%); filter: brightness(1.1) contrast(1.15) saturate(1.1); }
.hero-glow { position: absolute; top: 10px; right: -80px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255,107,0,.45) 0%, rgba(255,80,0,.2) 30%, transparent 65%); filter: blur(45px); pointer-events: none; z-index: 0; }
.hero-content { position: relative; z-index: 1; }
.hero-greet { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.hero-greet span { color: #ff6b00; }
.hero-tagline { font-size: 13px; color: #999; line-height: 1.4; margin-bottom: 22px; }
.level-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #888; font-weight: 800; letter-spacing: 1px; margin-bottom: 10px; }
.level-row b { color: #fff; }
.level-row .dot { color: #444; }
.xp-bar { height: 6px; background: #1a1a1a; border-radius: 3px; overflow: visible; position: relative; width: 300px; max-width: 72%; }
.xp-fill { height: 100%; background: linear-gradient(90deg, #ff6b00, #ffb347); border-radius: 3px; box-shadow: 0 0 16px rgba(255,107,0,.9); position: relative; }
.xp-fill::after { content: ''; position: absolute; right: -3px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; background: #fff; border-radius: 50%; box-shadow: 0 0 12px #ff6b00; }

/* ============ CARD WORKOUT ============ */
.card-workout { background: #0a0a0a; border: 1px solid rgba(255,107,0,.4); border-radius: 18px; cursor: pointer; padding: 0; overflow: hidden; box-shadow: 0 0 40px rgba(255,107,0,.12); margin-bottom: 18px; }
.card-photo { height: 140px; background-image: url('https://images.unsplash.com/photo-1583454110551-21f2fa2afe61?w=800&q=80&auto=format&fit=crop'); background-size: cover; background-position: center 25%; position: relative; }
.card-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(10,10,10,.35) 45%, #0a0a0a 100%), linear-gradient(90deg, rgba(255,60,0,.35), transparent 55%); }
.card-body { padding: 0 18px 18px; margin-top: -18px; position: relative; z-index: 1; }
.tag { display: inline-block; font-size: 10px; font-weight: 900; color: #ff6b00; letter-spacing: 1.5px; padding: 5px 10px; background: rgba(255,107,0,.14); border: 1px solid rgba(255,107,0,.4); border-radius: 6px; margin-bottom: 12px; }
.card-title { font-size: 26px; font-weight: 900; font-style: italic; line-height: .95; margin-bottom: 8px; letter-spacing: -1px; font-family: 'Arial Black', Impact, sans-serif; }
.card-sub { font-size: 12px; color: #aaa; margin-bottom: 14px; }
.card-meta { display: flex; gap: 16px; font-size: 12px; color: #999; margin-bottom: 14px; font-weight: 600; }
.card-actions { display: flex; gap: 8px; }
.btn-orange { flex: 1.4; padding: 12px 18px; border-radius: 10px; font-size: 12px; font-weight: 900; letter-spacing: 1px; cursor: pointer; border: none; background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; box-shadow: 0 6px 20px rgba(255,107,0,.5); font-family: inherit; font-style: italic; }
.btn-ghost { flex: 1; padding: 12px 12px; border-radius: 10px; font-size: 11px; font-weight: 900; letter-spacing: .5px; cursor: pointer; background: rgba(255,255,255,.04); color: #fff; border: 1.5px solid #333; font-family: inherit; font-style: italic; }

/* ============ QUICK GRID ============ */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.quick-card { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 14px; padding: 14px; text-align: left; cursor: pointer; position: relative; color: #fff; font-family: inherit; min-height: 120px; }
.quick-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,107,0,.08); border: 1.5px solid rgba(255,107,0,.4); border-radius: 11px; margin-bottom: 10px; font-size: 20px; }
.quick-title { font-size: 12px; font-weight: 900; letter-spacing: .8px; margin-bottom: 4px; font-style: italic; }
.quick-desc { font-size: 9.5px; color: #777; line-height: 1.3; padding-right: 20px; }
.quick-arrow { position: absolute; bottom: 12px; right: 14px; color: #ff6b00; font-size: 20px; font-weight: 900; }

/* ============ SECTION HEAD ============ */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; margin-top: 8px; }
.section-head h3, .h3-small { font-size: 11px; font-weight: 900; letter-spacing: 1.8px; color: #fff; text-transform: uppercase; font-style: italic; }
.h3-small { margin: 20px 0 12px; }
.link-btn { background: none; border: none; color: #ff6b00; font-size: 11px; font-weight: 900; cursor: pointer; font-family: inherit; letter-spacing: .3px; font-style: italic; }

/* ============ DAY GRID ============ */
.day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.day-card { background: #0d0d0d; border-radius: 13px; padding: 13px 11px; }
.day-icon { margin-bottom: 8px; font-size: 18px; }
.day-label { font-size: 8.5px; letter-spacing: 1.2px; color: #777; font-weight: 800; margin-bottom: 6px; }
.day-value { font-size: 10px; color: #777; margin-bottom: 8px; font-weight: 600; }
.day-value b { font-size: 15px; color: #fff; font-weight: 900; font-style: italic; }
.day-bar { height: 4px; background: #1a1a1a; border-radius: 2px; overflow: hidden; }
.day-fill { height: 100%; border-radius: 2px; }

/* ============ BANNER ============ */
.banner { position: relative; height: 120px; border-radius: 16px; overflow: hidden; margin-bottom: 18px; display: flex; align-items: center; padding: 22px; border: 1px solid rgba(255,107,0,.25); }
.banner-photo { position: absolute; inset: 0; background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=900&q=80&auto=format&fit=crop'); background-size: cover; background-position: center; }
.banner-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(255,60,0,.35) 55%, rgba(255,107,0,.55) 100%); }
.banner-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.banner-text div { font-size: 17px; font-weight: 900; font-style: italic; letter-spacing: -.5px; text-shadow: 0 2px 14px rgba(0,0,0,.95); font-family: 'Arial Black', Impact, sans-serif; line-height: 1.05; }
.banner-text b { color: #ff6b00; }

/* ============ WORKOUT PAGE ============ */
.workout-hero { position: relative; height: 180px; border-radius: 16px; overflow: hidden; margin-bottom: 16px; border: 1px solid rgba(255,107,0,.25); }
.workout-hero-photo { position: absolute; inset: 0; background-image: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=800&q=80&auto=format&fit=crop'); background-size: cover; background-position: center; }
.workout-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 40%, rgba(0,0,0,.95) 100%), linear-gradient(90deg, rgba(255,60,0,.4), transparent 60%); }
.workout-hero-content { position: relative; z-index: 1; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.workout-hero-content h3 { font-size: 22px; font-weight: 900; font-style: italic; line-height: .95; letter-spacing: -.5px; font-family: 'Arial Black', Impact, sans-serif; margin-bottom: 6px; }
.level-tag { display: inline-block; padding: 3px 8px; background: rgba(255,107,0,.9); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: 1px; border-radius: 5px; margin-bottom: 8px; width: fit-content; }
.workout-hero-meta { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: #ccc; font-weight: 600; }

.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 10px; color: #888; padding: 8px 14px; font-size: 10px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; cursor: pointer; font-family: inherit; line-height: 1.2; }
.day-tab small { font-size: 8.5px; color: #666; font-weight: 600; }
.day-tab.active { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; border-color: #ff6b00; box-shadow: 0 4px 12px rgba(255,107,0,.4); }
.day-tab.active small { color: #fff; opacity: .9; }

.exercise-list { display: flex; flex-direction: column; gap: 8px; }
.exercise-item { display: grid; grid-template-columns: 32px 60px 1fr auto; gap: 10px; background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 12px; padding: 10px; align-items: center; }
.ex-num { width: 26px; height: 26px; border-radius: 50%; background: #ff6b00; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; }
.ex-photo { 
  width: 60px; 
  height: 60px; 
  border-radius: 8px; 
  object-fit: cover; 
  display: block;
  background: #1a1a1a;
  flex-shrink: 0;
} { width: 60px; height: 60px; border-radius: 8px; background-size: cover; background-position: center; }
.ex-info { min-width: 0; }
.ex-name { font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.ex-muscle { font-size: 10px; color: #777; margin-bottom: 6px; }
.ex-stats { display: flex; gap: 10px; font-size: 10px; color: #aaa; font-weight: 600; }
.ex-stats b { color: #fff; font-weight: 800; display: block; font-size: 11px; }
.ex-stats small { color: #666; font-size: 9px; }
.ex-arrow { background: none; border: none; color: #666; font-size: 18px; cursor: pointer; }

.ai-helper-box { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(255,107,0,.12), transparent); border: 1px solid rgba(255,107,0,.3); border-radius: 12px; padding: 12px; margin: 14px 0; }
.ai-helper-icon { font-size: 24px; }
.ai-helper-content { flex: 1; min-width: 0; }
.ai-helper-title { font-size: 11px; font-weight: 900; color: #ff6b00; letter-spacing: 1px; margin-bottom: 2px; }
.ai-helper-text { font-size: 10px; color: #aaa; line-height: 1.3; }
.ai-helper-btn { background: none; border: 1px solid rgba(255,107,0,.5); color: #ff6b00; padding: 8px 12px; border-radius: 8px; font-size: 10px; font-weight: 900; cursor: pointer; font-family: inherit; letter-spacing: .5px; white-space: nowrap; }

.btn-orange-full { width: 100%; padding: 16px; border-radius: 12px; border: none; background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; font-size: 14px; font-weight: 900; letter-spacing: 1.5px; cursor: pointer; box-shadow: 0 8px 24px rgba(255,107,0,.5); font-family: inherit; font-style: italic; margin: 12px 0; }

.progress-week-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress-week-card { background: #0d0d0d; border-radius: 12px; padding: 12px; }
.progress-week-icon { font-size: 16px; margin-bottom: 6px; }
.progress-week-value { font-size: 15px; font-weight: 900; color: #fff; margin-bottom: 3px; font-style: italic; }
.progress-week-label { font-size: 9px; color: #777; margin-bottom: 8px; font-weight: 700; letter-spacing: .5px; }
.progress-week-bar { height: 4px; background: #1a1a1a; border-radius: 2px; overflow: hidden; }
.progress-week-bar div { height: 100%; border-radius: 2px; }

/* ============ AI PAGE ============ */
.ai-page-hero { position: relative; background: linear-gradient(135deg, rgba(255,107,0,.15), transparent); border: 1px solid rgba(255,107,0,.3); border-radius: 16px; padding: 16px; margin-bottom: 16px; overflow: hidden; }
.ai-page-title { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ai-logo { font-size: 36px; }
.ai-page-title h2 { font-size: 22px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; }
.ai-page-title p { font-size: 10px; color: #ff6b00; font-weight: 900; letter-spacing: 1.5px; margin-top: 2px; }
.ai-hero-image { position: absolute; top: 0; right: 0; width: 150px; height: 100%; background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80') center/cover; opacity: .3; mask-image: linear-gradient(90deg, transparent, black); -webkit-mask-image: linear-gradient(90deg, transparent, black); }

.ai-welcome { background: #0d0d0d; border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.ai-welcome-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-avatar { font-size: 22px; }
.ai-welcome-name { font-size: 13px; font-weight: 900; color: #ff6b00; font-style: italic; letter-spacing: 1px; }
.ai-welcome-msg { font-size: 13px; color: #ccc; line-height: 1.6; }
.ai-welcome-msg b { color: #fff; }

.ai-quick-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ai-question { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; text-align: left; font-family: inherit; color: #fff; }
.ai-q-icon { font-size: 20px; flex-shrink: 0; }
.ai-q-text b { font-size: 11px; display: block; margin-bottom: 3px; font-weight: 800; }
.ai-q-text small { font-size: 9.5px; color: #777; line-height: 1.3; display: block; }

.ai-features-bar { display: flex; justify-content: space-around; align-items: center; background: linear-gradient(135deg, rgba(255,107,0,.12), transparent); border: 1px solid rgba(255,107,0,.3); border-radius: 10px; padding: 10px; font-size: 10px; font-weight: 900; color: #ff6b00; letter-spacing: 1.5px; margin-bottom: 16px; }

.ai-chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 300px; overflow-y: auto; }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 12px; line-height: 1.4; }
.ai-msg.user { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-msg.ai { background: #1a1a1a; color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid #262626; }
.ai-msg-time { font-size: 9px; opacity: .6; margin-top: 4px; }

.ai-input-row { display: flex; gap: 8px; }
.ai-input-row input { flex: 1; padding: 12px 16px; background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 24px; color: #fff; font-size: 13px; font-family: inherit; }
.ai-input-row input:focus { outline: none; border-color: #ff6b00; }
.ai-send { background: linear-gradient(135deg, #ff6b00, #ff8533); border: none; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 18px; cursor: pointer; box-shadow: 0 4px 16px rgba(255,107,0,.5); }

/* ============ NUTRICIÓN ============ */
.nutrition-hero { position: relative; background: #0d0d0d; border-radius: 16px; padding: 18px; margin-bottom: 14px; overflow: hidden; display: flex; gap: 12px; border: 1px solid rgba(255,107,0,.25); min-height: 170px; }
.nutrition-hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 55%; background: url('https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=500&q=80') center/cover; opacity: .5; mask-image: linear-gradient(90deg, transparent, black); -webkit-mask-image: linear-gradient(90deg, transparent, black); }
.nutrition-hero-content { position: relative; z-index: 1; flex: 1; }
.nutrition-hero-content h3 { font-size: 18px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; line-height: 1; margin-bottom: 6px; }
.nutrition-hero-content p { font-size: 11px; color: #aaa; margin-bottom: 12px; }
.btn-orange-sm { padding: 9px 14px; border-radius: 8px; background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; border: none; font-size: 10px; font-weight: 900; letter-spacing: 1px; cursor: pointer; font-family: inherit; font-style: italic; box-shadow: 0 4px 12px rgba(255,107,0,.4); }
.nutrition-ring-container { position: relative; width: 140px; height: 140px; flex-shrink: 0; z-index: 1; }
.ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.ring-value { font-size: 22px; font-weight: 900; color: #ff6b00; font-style: italic; }
.ring-label { font-size: 10px; color: #777; letter-spacing: 1px; font-weight: 700; }

.macros-row { display: flex; gap: 6px; margin-bottom: 14px; }
.macro-pill { flex: 1; background: #0d0d0d; border-left: 3px solid var(--c); border-radius: 8px; padding: 10px 8px; font-size: 9.5px; color: #888; font-weight: 700; line-height: 1.4; }
.macro-pill b { color: #fff; font-size: 12px; font-weight: 900; }

.nut-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.nut-quick { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 10px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-family: inherit; color: #fff; }
.nut-quick div { font-size: 18px; }
.nut-quick span { font-size: 8.5px; font-weight: 900; letter-spacing: .5px; text-align: center; line-height: 1.1; color: #ff6b00; }

.meal-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.meal-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 12px; padding: 10px; align-items: center; }
.meal-photo { width: 60px; height: 60px; border-radius: 8px; background-size: cover; background-position: center; }
.meal-info { min-width: 0; }
.meal-type { font-size: 9px; color: #ff6b00; font-weight: 900; letter-spacing: 1px; margin-bottom: 3px; }
.meal-name { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.meal-detail { font-size: 10px; color: #777; }
.meal-macros { display: flex; gap: 8px; font-size: 9.5px; color: #aaa; margin-top: 4px; font-weight: 700; }
.meal-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #333; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #10b981; }
.meal-check.done { background: #10b981; border-color: #10b981; color: #fff; }

.water-progress-card { background: #0d0d0d; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.water-header { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 10px; font-weight: 700; }
.water-header b { font-size: 16px; font-weight: 900; color: #0ea5e9; }
.water-header b small { font-size: 11px; color: #777; font-weight: 600; }
.water-bar { height: 8px; background: #1a1a1a; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.water-bar div { height: 100%; border-radius: 4px; transition: width .3s; }
.water-actions { display: flex; gap: 6px; }
.water-actions button { flex: 1; padding: 8px; background: rgba(14,165,233,.12); border: 1px solid rgba(14,165,233,.3); color: #0ea5e9; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: inherit; }

/* ============ PROGRESO ============ */
.progress-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: none; }
.progress-tabs::-webkit-scrollbar { display: none; }
.p-tab { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 20px; color: #888; padding: 7px 14px; font-size: 10px; font-weight: 900; letter-spacing: .8px; cursor: pointer; font-family: inherit; font-style: italic; white-space: nowrap; }
.p-tab.active { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; border-color: #ff6b00; }

.progress-hero { position: relative; background: #0d0d0d; border-radius: 16px; overflow: hidden; margin-bottom: 16px; min-height: 140px; padding: 18px; border: 1px solid rgba(255,107,0,.3); }
.progress-hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; background: url('https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=500&q=80') center top/cover; opacity: .55; mask-image: linear-gradient(90deg, transparent, black); -webkit-mask-image: linear-gradient(90deg, transparent, black); }
.progress-hero-content { position: relative; z-index: 1; }
.progress-hero-title { font-size: 18px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; margin-bottom: 6px; line-height: 1.1; }
.progress-hero-title b { color: #ff6b00; }
.progress-hero p { font-size: 11px; color: #aaa; margin-bottom: 12px; max-width: 55%; }
.progress-bar-63 { width: 200px; height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; max-width: 55%; }
.progress-bar-63 div { height: 100%; background: linear-gradient(90deg, #ff6b00, #ffb347); border-radius: 3px; }

.progress-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.metric-card { background: #0d0d0d; border-radius: 12px; padding: 12px; position: relative; }
.metric-label { font-size: 9px; color: #777; font-weight: 800; letter-spacing: .8px; margin-bottom: 6px; }
.metric-value { font-size: 17px; font-weight: 900; font-style: italic; color: #fff; margin-bottom: 3px; }
.metric-change { font-size: 10px; font-weight: 800; }
.metric-change.up { color: #ff6b00; }
.metric-change.down { color: #10b981; }
.metric-spark { width: 100%; height: 26px; margin-top: 6px; }

. { background: #0d0d0d; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.chart-box { 
  background: #0d0d0d; 
  border-radius: 14px; 
  padding: 14px; 
  margin-bottom: 14px; 
  overflow: hidden;
}
.chart-box canvas { 
  display: block; 
  width: 100%; 
  height: auto;
} canvas { width: 100%; height: auto; }

.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr-card { background: #0d0d0d; border-radius: 12px; padding: 12px; }
.pr-ex { font-size: 10px; color: #888; margin-bottom: 4px; font-weight: 700; }
.pr-val { font-size: 16px; font-weight: 900; color: #fff; font-style: italic; }
.pr-chg { font-size: 10px; color: #10b981; font-weight: 800; margin-top: 2px; }

.progress-visual { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; background: #0d0d0d; border-radius: 12px; padding: 12px; }
.visual-photo { aspect-ratio: 3/4; border-radius: 8px; }
.visual-info { font-size: 11px; font-weight: 800; display: flex; flex-direction: column; gap: 4px; }
.visual-info > div:first-child { color: #ff6b00; }
.visual-checks { font-size: 10px; color: #10b981; font-weight: 600; margin-top: 4px; line-height: 1.5; }

/* ============ RETOS ============ */
.challenge-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: none; }
.challenge-tabs::-webkit-scrollbar { display: none; }
chart-box.c-tab { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 20px; color: #888; padding: 7px 14px; font-size: 10px; font-weight: 900; letter-spacing: .8px; cursor: pointer; font-family: inherit; font-style: italic; white-space: nowrap; }
.c-tab.active { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; border-color: #ff6b00; }

.featured-challenge { position: relative; background: #0d0d0d; border-radius: 16px; overflow: hidden; margin-bottom: 16px; min-height: 180px; border: 1px solid rgba(255,107,0,.35); display: grid; grid-template-columns: 1fr auto; }
.featured-photo { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=600&q=80') center/cover; opacity: .35; mask-image: linear-gradient(90deg, black, transparent); -webkit-mask-image: linear-gradient(90deg, black, transparent); }
.featured-content { position: relative; z-index: 1; padding: 18px; max-width: 65%; }
.featured-badge { display: inline-block; font-size: 9px; font-weight: 900; color: #ff6b00; letter-spacing: 1.2px; padding: 4px 8px; background: rgba(255,107,0,.15); border: 1px solid rgba(255,107,0,.4); border-radius: 5px; margin-bottom: 10px; }
.featured-content h3 { font-size: 20px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; line-height: 1; margin-bottom: 8px; }
.featured-content p { font-size: 11px; color: #aaa; line-height: 1.4; margin-bottom: 12px; }
.featured-xp { position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.xp-badge { font-size: 9px; color: #ff6b00; font-weight: 900; letter-spacing: 1.5px; }
.xp-amount { font-size: 26px; font-weight: 900; color: #ff6b00; font-style: italic; line-height: 1; }
.xp-period { font-size: 9px; color: #aaa; font-weight: 800; letter-spacing: 1px; padding: 2px 6px; background: rgba(255,107,0,.15); border-radius: 4px; margin-top: 6px; }

.challenge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.challenge-card { background: #0d0d0d; border-radius: 12px; padding: 12px; }
.challenge-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.challenge-icon { font-size: 18px; }
.challenge-badge { font-size: 8px; color: #ff6b00; font-weight: 900; letter-spacing: .8px; padding: 2px 6px; background: rgba(255,107,0,.15); border-radius: 4px; }
.challenge-name { font-size: 10.5px; font-weight: 900; margin-bottom: 4px; letter-spacing: .3px; }
.challenge-progress { font-size: 10px; color: #ff6b00; font-weight: 800; margin-bottom: 6px; }
.challenge-bar { height: 4px; background: #1a1a1a; border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.challenge-bar div { height: 100%; background: linear-gradient(90deg, #ff6b00, #ffb347); border-radius: 2px; }
.challenge-reward { font-size: 9px; color: #10b981; font-weight: 900; letter-spacing: .5px; }

.level-display { display: flex; align-items: center; gap: 12px; background: #0d0d0d; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.level-badge-big { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, #ff6b00, #cc3700); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; font-style: italic; color: #fff; box-shadow: 0 0 20px rgba(255,107,0,.5); flex-shrink: 0; }
.level-info { flex: 1; }
.level-name { font-size: 12px; font-weight: 900; font-style: italic; letter-spacing: 1px; margin-bottom: 6px; }
.level-progress-bar { height: 5px; background: #1a1a1a; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.level-progress-bar div { height: 100%; background: linear-gradient(90deg, #ff6b00, #ffb347); border-radius: 3px; }
.level-progress-text { font-size: 9.5px; color: #888; font-weight: 700; }
.next-level { text-align: center; flex-shrink: 0; }
.next-icon { font-size: 24px; margin-bottom: 2px; opacity: .5; }
.next-name { font-size: 8.5px; color: #777; font-weight: 800; letter-spacing: .5px; line-height: 1.2; }
.next-name b { color: #ff6b00; }

.friend-challenge-card { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; background: #0d0d0d; border-radius: 14px; padding: 12px; align-items: center; }
.friend-photo { width: 60px; height: 60px; border-radius: 10px; background: url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?w=200&q=80') center/cover; }
.friend-challenge-title { font-size: 10px; color: #ff6b00; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.friend-challenge-text { font-size: 10px; color: #aaa; line-height: 1.3; }

/* ============ COMUNIDAD ============ */
.community-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: none; }
.community-tabs::-webkit-scrollbar { display: none; }
.com-tab { background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 20px; color: #888; padding: 7px 14px; font-size: 10px; font-weight: 900; letter-spacing: .8px; cursor: pointer; font-family: inherit; font-style: italic; white-space: nowrap; }
.com-tab.active { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; border-color: #ff6b00; }

.stories-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; scrollbar-width: none; }
.stories-row::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; cursor: pointer; }
.story-avatar { width: 56px; height: 56px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid rgba(255,107,0,.6); padding: 2px; }
.story-add .story-avatar { background: linear-gradient(135deg, #ff6b00, #cc3700); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; border: 2px solid #333; }
.story span { font-size: 9.5px; color: #999; font-weight: 700; max-width: 60px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.community-hero { position: relative; height: 140px; border-radius: 16px; overflow: hidden; margin-bottom: 16px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; border: 1px solid rgba(255,107,0,.3); }
.community-hero-photo { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1517836357463-d25dfeac3438?w=800&q=80') center/cover; opacity: .5; }
.community-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.4) 40%, rgba(0,0,0,.95) 100%); }
.community-hero-content { position: relative; z-index: 1; }
.community-hero-content h3 { font-size: 18px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; margin-bottom: 4px; }
.community-hero-content p { font-size: 10px; color: #ccc; margin-bottom: 10px; }

.feed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.feed-post { background: #0d0d0d; border-radius: 14px; padding: 12px; }
.feed-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-avatar { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0; }
.feed-info { flex: 1; }
.feed-name { font-size: 12px; font-weight: 800; }
.feed-time { font-size: 9.5px; color: #666; }
.feed-text { font-size: 12px; line-height: 1.4; margin-bottom: 10px; color: #ddd; }
.feed-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 10px; }
.feed-photos div { aspect-ratio: 1; border-radius: 6px; background-size: cover; background-position: center; }
.feed-actions { display: flex; gap: 16px; padding-top: 8px; border-top: 1px solid #1a1a1a; font-size: 11px; color: #888; }
.feed-actions button { background: none; border: none; color: inherit; font-family: inherit; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 4px; }

.ranking-card { background: #0d0d0d; border-radius: 14px; padding: 12px; }
.ranking-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.r-tab { flex: 1; padding: 6px; background: none; border: none; color: #777; font-size: 10px; font-weight: 900; cursor: pointer; font-family: inherit; border-radius: 6px; }
.r-tab.active { background: rgba(255,107,0,.15); color: #ff6b00; }
.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.rank-item { display: grid; grid-template-columns: 24px 32px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; font-size: 11px; }
.rank-pos { font-size: 13px; font-weight: 900; color: #ff6b00; text-align: center; }
.rank-avatar { width: 32px; height: 32px; border-radius: 50%; background-size: cover; background-position: center; }
.rank-name { font-weight: 700; }
.rank-xp { font-size: 11px; font-weight: 900; color: #ff6b00; }

.achievements-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ach-item { background: #0d0d0d; border-radius: 10px; padding: 10px 4px; text-align: center; }
.ach-icon { font-size: 20px; margin-bottom: 4px; }
.ach-label { font-size: 8.5px; color: #888; font-weight: 800; line-height: 1.2; }

/* ============ PERFIL ============ */
.profile-hero { text-align: center; margin-bottom: 20px; }
.avatar-lg { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 12px; background: url('https://images.unsplash.com/photo-1568602471122-7832951cc4c5?w=200&q=80') center/cover; border: 3px solid rgba(255,107,0,.7); box-shadow: 0 0 36px rgba(255,107,0,.6); }
.profile-hero h3 { font-size: 22px; font-weight: 900; font-style: italic; margin-bottom: 4px; }
.profile-level { font-size: 12px; color: #ff6b00; font-weight: 800; letter-spacing: 1px; }
.input-group { margin-bottom: 12px; }
.input-group label { display: block; font-size: 10px; letter-spacing: 1.2px; color: #777; font-weight: 800; margin-bottom: 6px; }
.input-field { width: 100%; padding: 14px 16px; background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 12px; color: #fff; font-size: 14px; font-family: inherit; }
.input-field:focus { outline: none; border-color: #ff6b00; }
.btn-primary, .btn-danger { width: 100%; padding: 15px; border: none; border-radius: 13px; font-size: 13px; font-weight: 900; letter-spacing: 1.2px; cursor: pointer; margin-bottom: 10px; font-family: inherit; font-style: italic; }
.btn-primary { background: linear-gradient(135deg, #ff6b00, #ff8533); color: #fff; box-shadow: 0 6px 22px rgba(255,107,0,.4); }
.btn-danger { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

/* ============ NAV ============ */
.nav { 
  position: fixed; 
  bottom: 0; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 100%; 
  max-width: 430px; 
  background: rgba(0,0,0,.98); 
  backdrop-filter: blur(24px); 
  -webkit-backdrop-filter: blur(24px);
  display: grid; 
  grid-template-columns: repeat(8, 1fr); 
  padding: 8px 2px; 
  padding-bottom: calc(8px + var(--safe-bottom)); 
  border-top: 1px solid #1a1a1a; 
  z-index: 100; 
}
.nav-btn { 
  background: none; 
  border: none; 
  color: #444; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 3px; 
  padding: 6px 1px; 
  cursor: pointer; 
  font-family: inherit; 
  border-radius: 8px; 
  transition: color .2s; 
}
.nav-btn span { 
  font-size: 8px; 
  font-weight: 900; 
  letter-spacing: .1px; 
}
.nav-btn.active { 
  color: #ff6b00; 
}
.nav-btn.active svg { 
  filter: drop-shadow(0 0 8px rgba(255,107,0,.95)); 
} position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: rgba(0,0,0,.98); backdrop-filter: blur(24px); display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px 4px; padding-bottom: calc(8px + var(--safe-bottom)); border-top: 1px solid #1a1a1a; z-index: 100; }
.nav-btn { background: none; border: none; color: #444; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; cursor: pointer; font-family: inherit; border-radius: 8px; transition: color .2s; }
.nav-btn span { font-size: 8.5px; font-weight: 900; letter-spacing: .2px; }
.nav-btn.active { color: #ff6b00; }
.nav-btn.active svg { filter: drop-shadow(0 0 8px rgba(255,107,0,.95)); }

/* ============ MODAL / TOAST / SPLASH ============ */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.92); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { background: #0d0d0d; width: 100%; max-width: 430px; max-height: 85vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 24px; position: relative; border-top: 1px solid rgba(255,107,0,.35); }
.modal-close { position: absolute; top: 16px; right: 16px; background: #1a1a1a; border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 14px; font-family: inherit; font-weight: 900; }
.toast { position: fixed; bottom: calc(110px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); background: #10b981; color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 12px; font-weight: 800; z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: toastIn .3s; }
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.splash { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity .5s, visibility .5s; }
.splash.hidden { opacity: 0; visibility: hidden; }
.splash-logo { font-size: 42px; font-weight: 900; font-style: italic; font-family: 'Arial Black', Impact, sans-serif; background: linear-gradient(180deg, #fff 0%, #c0c0c0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 4px; }
.splash-x { width: 56px; height: 56px; }
.splash-sub { font-size: 10px; letter-spacing: 5px; color: #ff6b00; font-weight: 800; }
.splash-loader { width: 120px; height: 3px; background: rgba(255,107,0,.15); border-radius: 2px; overflow: hidden; margin-top: 20px; }
.splash-loader div { width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #ff6b00, transparent); animation: loadAnim 1.2s infinite; }
@keyframes loadAnim { 0% { transform: translateX(-150%); } 100% { transform: translateX(300%); } }
/* Imágenes responsive */
img {
  max-width: 100%;
  height: auto;
}
img[src*="data:image"] {
  object-fit: contain;
}
/* ==========================================
   HEADER CON LOGO GAINZX (idéntico al mockup)
   ========================================== */

.header {
  padding: 12px 14px;
  padding-top: calc(12px + var(--safe-top));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100;
  border-bottom: 1px solid #0d0d0d;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-btn:active {
  background: rgba(255, 107, 0, 0.1);
}

/* Logo GAINZX del header */
.brand-logo-full {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.brand-text {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1.5px;
  background: linear-gradient(180deg, #ffffff 0%, #c8c8c8 50%, #808080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.brand-x-logo {
  width: 38px;
  height: 38px;
  display: inline-block;
  margin-left: -2px;
  margin-top: -2px;
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.9));
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: #151515;
  border: 1px solid #262626;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.icon-btn:active {
  background: #222;
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid #0a0a0a;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255, 107, 0, 0.8);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.6);
  transition: transform 0.2s;
}

.avatar:active {
  transform: scale(0.94);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================
   NAV INFERIOR (8 BOTONES FUNCIONALES)
   ========================================== */

.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  padding: 6px 2px;
  padding-bottom: calc(6px + var(--safe-bottom));
  border-top: 1px solid #1a1a1a;
  z-index: 100;
}

.nav-btn {
  background: none;
  border: none;
  color: #4a4a4a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 1px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 8px;
  transition: color 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:active {
  transform: scale(0.9);
}

.nav-btn span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  line-height: 1;
}

.nav-btn.active {
  color: #ff6b00;
}

.nav-btn.active svg {
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, 1));
}

/* Responsive */
@media (min-width: 431px) {
  .nav { max-width: 430px; border-radius: 20px 20px 0 0; }
}

/* ==========================================
   AJUSTES VISUALES FINALES
   ========================================== */

/* Wrapper de foto con icono play */
.ex-photo-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.ex-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(255, 107, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Timer flotante */
.rest-timer-float {
  position: fixed;
  bottom: calc(110px + var(--safe-bottom));
  right: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b00, #cc3700);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.6);
  z-index: 200;
  animation: pulse-timer 2s infinite;
}

@keyframes pulse-timer {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.rest-timer-float .time {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}

.rest-timer-float .label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Mejorar el ex-stats */
.ex-stats b {
  font-size: 11px;
  color: #fff;
}

.ex-stats small {
  font-size: 8px;
  color: #666;
  display: block;
  margin-top: 1px;
}

/* Fotos con mejor calidad */
.ex-photo {
  object-fit: cover;
  border-radius: 10px;
}

/* Estilos del modal mejorados */
.modal-content {
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================
   TIMER DE ENTRENAMIENTO ACTIVO
   ========================================== */
#workoutTimer {
  font-family: 'SF Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255, 107, 0, 0.6);
  animation: timer-pulse 1s infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ==========================================
   DAY TABS ACTIVOS CON MÁS CONTRASTE
   ========================================== */
.day-tab {
  transition: all 0.2s;
}

.day-tab:active {
  transform: scale(0.95);
}

.day-tab.active {
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.6);
}

/* ==========================================
   MODAL MÁS VISIBLE
   ========================================== */
.modal-content {
  border-top: 2px solid #ff6b00;
}

/* ==========================================
   TABS PREMIUM GAINZX
   ========================================== */

/* ====== BASE COMÚN DE TODOS LOS TABS ====== */
.day-tabs,
.progress-tabs,
.challenge-tabs,
.community-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.day-tabs::-webkit-scrollbar,
.progress-tabs::-webkit-scrollbar,
.challenge-tabs::-webkit-scrollbar,
.community-tabs::-webkit-scrollbar {
  display: none;
}

/* ====== TABS CON ICONOS Y GLOW ====== */
.day-tab,
.p-tab,
.c-tab,
.com-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(13, 13, 13, 0.8);
  border: 1.5px solid #1e1e1e;
  border-radius: 12px;
  color: #888;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-family: inherit;
  font-style: italic;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Brillo sutil arriba de cada tab */
.day-tab::before,
.p-tab::before,
.c-tab::before,
.com-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.day-tab:active,
.p-tab:active,
.c-tab:active,
.com-tab:active {
  transform: scale(0.96);
}

/* ====== TAB ACTIVO ====== */
.day-tab.active,
.p-tab.active,
.c-tab.active,
.com-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow:
    0 4px 20px rgba(255, 107, 0, 0.5),
    0 0 0 1px rgba(255, 133, 51, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.day-tab.active::before,
.p-tab.active::before,
.c-tab.active::before,
.com-tab.active::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

/* Indicador inferior tipo pill */
.day-tab.active::after,
.p-tab.active::after,
.c-tab.active::after,
.com-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: #ff6b00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.9);
  animation: indicatorSlide 0.35s ease;
}

@keyframes indicatorSlide {
  from { width: 0; opacity: 0; }
  to { width: 24px; opacity: 1; }
}

/* ====== ICONOS DENTRO DE LOS TABS ====== */
.day-tab svg,
.p-tab svg,
.c-tab svg,
.com-tab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.day-tab.active svg,
.p-tab.active svg,
.c-tab.active svg,
.com-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

/* ====== BADGE CONTADOR EN EL TAB ====== */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  background: rgba(255, 107, 0, 0.9);
  color: #fff;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0;
  margin-left: 2px;
}

.day-tab.active .tab-badge,
.p-tab.active .tab-badge,
.c-tab.active .tab-badge,
.com-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ====== VARIANTE ESPECÍFICA: DÍAS (ENTRENO) ====== */
.day-tab {
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  min-width: 62px;
  text-align: center;
}

.day-tab small {
  font-size: 8.5px;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-style: normal;
  transition: color 0.25s;
}

.day-tab.active small {
  color: rgba(255, 255, 255, 0.85);
}

.day-tab .day-num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* ====== VARIANTE ESPECÍFICA: COMUNIDAD (tabs anchos) ====== */
.community-tabs .com-tab {
  flex: 1;
  justify-content: center;
  min-width: 72px;
  padding: 10px 12px;
}

/* ====== VARIANTE: RETOS ====== */
.challenge-tabs .c-tab {
  padding: 10px 18px;
  min-width: 78px;
}

/* ==========================================
   SCROLL INDICATOR (gradiente lateral)
   ========================================== */
.day-tabs,
.progress-tabs,
.challenge-tabs,
.community-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8px, #000 calc(100% - 20px), transparent 100%);
}

/* ==========================================
   ANIMACIÓN HOVER EN DESKTOP
   ========================================== */
@media (hover: hover) {
  .day-tab:not(.active):hover,
  .p-tab:not(.active):hover,
  .c-tab:not(.active):hover,
  .com-tab:not(.active):hover {
    border-color: rgba(255, 107, 0, 0.4);
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
  }
}

/* ==========================================
   TABS CON PROGRESO (barra interna)
   ========================================== */
.tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b00, #ffb347);
  border-radius: 0 0 12px 12px;
  transition: width 0.4s;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.8);
}

/* ==========================================
   GRID DE TABS (cuando hay 3-4)
   ========================================== */
.tabs-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow-x: visible !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.tabs-grid-4 .tab {
  padding: 12px 8px;
  font-size: 10px;
  justify-content: center;
}

/* ==========================================
   ESTADO PULSADO / PULSE EN NUEVOS TABS
   ========================================== */
.p-tab.new::after,
.c-tab.new::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ==========================================
   VIDEO EN EJERCICIOS
   ========================================== */

/* Hacer el modal más ancho para el video */
.modal-content {
  max-width: 460px;
}

/* Iframe responsive */
.modal-content iframe {
  display: block;
  background: #000;
}

/* Animación al abrir el modal */
.modal-content {
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Efecto glow al hover */
.modal-content iframe:hover {
  box-shadow: 0 0 40px rgba(255, 107, 0, 0.3);
}

/* Wrapper de la foto */
.ex-photo-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
}

.ex-photo-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

/* Icono play sobre la foto */
.ex-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  background: rgba(255, 107, 0, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  z-index: 2;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 107, 0, 0.5);
  transition: transform 0.25s;
}

.exercise-item:active .ex-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Badge de duración del video */
.ex-video-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 3;
  backdrop-filter: blur(4px);
}

/* ==========================================
   RETOS — SECCIONES MEJORADAS
   ========================================== */

.challenge-section {
  margin-bottom: 24px;
}

/* ==========================================
   RANKING CARD (RETOS)
   ========================================== */
.ranking-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.ranking-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: #0a0a0a;
  padding: 4px;
  border-radius: 10px;
}

.r-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  color: #777;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 7px;
  font-style: italic;
  transition: all 0.2s;
}

.r-tab.active {
  background: linear-gradient(135deg, #ff6b00, #ff8533);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.rank-item {
  display: grid;
  grid-template-columns: 24px 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid #1a1a1a;
  transition: background 0.2s;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-item:hover {
  background: rgba(255, 107, 0, 0.05);
}

.rank-pos {
  font-size: 14px;
  font-weight: 900;
  color: #ff6b00;
  text-align: center;
  font-style: italic;
}

.rank-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 107, 0, 0.3);
}

.rank-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-xp {
  font-size: 11px;
  font-weight: 900;
  color: #ff6b00;
  font-style: italic;
  white-space: nowrap;
}

/* ==========================================
   RECOMPENSAS Y LOGROS
   ========================================== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.achievement-item {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.achievement-item.unlocked {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.08), rgba(255, 107, 0, 0.02));
  border-color: rgba(255, 107, 0, 0.4);
}

.achievement-item.unlocked::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
}

.achievement-item.locked {
  opacity: 0.5;
}

.achievement-item:active {
  transform: scale(0.95);
}

.achievement-icon {
  font-size: 24px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.achievement-item.unlocked .achievement-icon {
  filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.6));
}

.achievement-name {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #fff;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.achievement-desc {
  font-size: 8px;
  color: #777;
  line-height: 1.2;
}

.achievement-item.unlocked .achievement-desc {
  color: #aaa;
}

/* ==========================================
   CHALLENGE CARDS MEJORADAS
   ========================================== */
.challenge-card {
  cursor: pointer;
  transition: all 0.25s;
}

.challenge-card:active {
  transform: scale(0.97);
}

.challenge-card:hover {
  border-color: rgba(255, 107, 0, 0.4);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.1);
}

.challenge-icon {
  font-size: 20px;
}

/* ==========================================
   MODAL DE RETO
   ========================================== */
.challenge-detail-modal {
  padding: 6px 0;
}

.challenge-detail-modal .challenge-hero {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), transparent);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 14px;
  margin-bottom: 16px;
}

.challenge-detail-modal .challenge-icon-big {
  font-size: 56px;
  margin-bottom: 10px;
}

.challenge-detail-modal .challenge-title {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  font-family: 'Arial Black', Impact, sans-serif;
  margin-bottom: 6px;
}

.challenge-detail-modal .challenge-xp-big {
  font-size: 14px;
  color: #ff6b00;
  font-weight: 900;
  letter-spacing: 1px;
}

/* ==========================================
   TÍTULOS CENTRADOS EN TODAS LAS SECCIONES
   ========================================== */
.page-title {
  text-align: center !important;
  margin-bottom: 20px !important;
  padding: 0 16px;
}

.page-title h2 {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.page-subtitle {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin: 6px auto 0 !important;
}

/* Centrar los títulos de sección (los h3 pequeños) */
.h3-small {
  text-align: left !important;
}

/* Los section-head mantienen su layout */
.section-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Centrar los títulos "RUTINA DEL DÍA", "PROGRESO", "RETOS", "COMUNIDAD" */
#workouts .page-title,
#progress .page-title,
#challenges .page-title,
#community .page-title {
  text-align: center !important;
}

#progress h2,
#challenges h2,
#community h2 {
  text-align: center !important;
  margin: 0 auto !important;
}

/* ==========================================
   TABS DE PROGRESO — TEXTO CENTRADO
   ========================================== */

/* Contenedor de tabs de progreso */
.progress-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  align-items: stretch;
}

.progress-tabs::-webkit-scrollbar {
  display: none;
}

/* Cada tab */
.progress-tabs .p-tab {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  min-width: 82px;
  max-width: 100px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  color: #888;
  font-family: inherit;
  font-style: italic;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Icono dentro del tab */
.progress-tabs .p-tab svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform 0.25s;
}

/* El span del texto */
.progress-tabs .p-tab span {
  display: inline-block;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-style: italic;
}

/* Tab activo */
.progress-tabs .p-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow:
    0 4px 20px rgba(255, 107, 0, 0.5),
    0 0 0 1px rgba(255, 133, 51, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.progress-tabs .p-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

/* Indicador inferior */
.progress-tabs .p-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #ff6b00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.9);
}

/* Estado activo :active */
.progress-tabs .p-tab:active {
  transform: scale(0.96);
}

/* Hover */
@media (hover: hover) {
  .progress-tabs .p-tab:not(.active):hover {
    border-color: rgba(255, 107, 0, 0.4);
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
  }
}

/* Responsive: en pantallas muy pequeñas, hacemos los tabs aún más compactos */
@media (max-width: 380px) {
  .progress-tabs .p-tab {
    min-width: 72px;
    padding: 8px 10px;
    font-size: 9px;
    gap: 4px;
  }
  .progress-tabs .p-tab span {
    font-size: 9px;
  }
  .progress-tabs .p-tab svg {
    width: 12px;
    height: 12px;
  }
}

/* ==========================================
   TABS UNIFICADOS — TODAS LAS SECCIONES
   ========================================== */

/* ==========================================
   1. TABS DE DÍAS (ENTRENO)
   ========================================== */
.day-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  align-items: stretch;
}
.day-tabs::-webkit-scrollbar { display: none; }

.day-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  min-width: 68px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  color: #888;
  font-family: inherit;
  font-style: italic;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.day-tab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.day-tab .day-num {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-align: center;
}

.day-tab small {
  font-size: 8.5px;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-style: normal;
  text-align: center;
  line-height: 1;
}

.day-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
  transform: translateY(-1px);
}

.day-tab.active small {
  color: rgba(255, 255, 255, 0.85);
}

.day-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

.day-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #ff6b00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.9);
}

.day-tab:active { transform: scale(0.96); }

@media (hover: hover) {
  .day-tab:not(.active):hover {
    border-color: rgba(255, 107, 0, 0.4);
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
  }
}

/* ==========================================
   2. TABS DE PROGRESO
   ========================================== */
.progress-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  align-items: stretch;
}
.progress-tabs::-webkit-scrollbar { display: none; }

.progress-tabs .p-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  min-width: 90px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  color: #888;
  font-family: inherit;
  font-style: italic;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.progress-tabs .p-tab svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.progress-tabs .p-tab span {
  display: inline-block;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-style: italic;
}

.progress-tabs .p-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
  transform: translateY(-1px);
}

.progress-tabs .p-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

.progress-tabs .p-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #ff6b00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.9);
}

.progress-tabs .p-tab:active { transform: scale(0.96); }

@media (hover: hover) {
  .progress-tabs .p-tab:not(.active):hover {
    border-color: rgba(255, 107, 0, 0.4);
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
  }
}

/* ==========================================
   3. TABS DE COMUNIDAD (RETOS Y COMUNIDAD)
   ========================================== */
.community-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  align-items: stretch;
}
.community-tabs::-webkit-scrollbar { display: none; }

.community-tabs .com-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  min-width: 78px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  color: #888;
  font-family: inherit;
  font-style: italic;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.community-tabs .com-tab svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.community-tabs .com-tab span {
  display: inline-block;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-style: italic;
}

.community-tabs .com-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
  transform: translateY(-1px);
}

.community-tabs .com-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  transform: scale(1.1);
}

.community-tabs .com-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #ff6b00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.9);
}

.community-tabs .com-tab:active { transform: scale(0.96); }

@media (hover: hover) {
  .community-tabs .com-tab:not(.active):hover {
    border-color: rgba(255, 107, 0, 0.4);
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
  }
}

/* ==========================================
   4. TABS DE RETOS (challenge-tabs)
   ========================================== */
.challenge-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  align-items: stretch;
}
.challenge-tabs::-webkit-scrollbar { display: none; }

.challenge-tabs .c-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  min-width: 82px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  color: #888;
  font-family: inherit;
  font-style: italic;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.challenge-tabs .c-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%);
  border-color: #ff8533;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
  transform: translateY(-1px);
}

.challenge-tabs .c-tab:active { transform: scale(0.96); }

/* ==========================================
   RESPONSIVE — Tabs más pequeños en pantallas chicas
   ========================================== */
@media (max-width: 380px) {
  .day-tab { min-width: 60px; padding: 8px 10px; }
  .progress-tabs .p-tab { min-width: 78px; padding: 8px 10px; font-size: 9px; }
  .progress-tabs .p-tab span { font-size: 9px; }
  .community-tabs .com-tab { min-width: 68px; padding: 8px 10px; font-size: 9px; }
  .community-tabs .com-tab span { font-size: 9px; }
  .challenge-tabs .c-tab { min-width: 72px; padding: 8px 12px; font-size: 9px; }
}

/* ==========================================
   TABS UNIFICADOS — VERSIÓN DEFINITIVA
   ========================================== */

/* ========== ENTRENO (DÍAS) ========== */
.day-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 6px 2px 14px !important;
  margin-bottom: 16px !important;
  scrollbar-width: none !important;
  justify-content: center !important;
  align-items: center !important;
}
.day-tabs::-webkit-scrollbar { display: none !important; }

.day-tab {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 10px 14px !important;
  min-width: 70px !important;
  flex-shrink: 0 !important;
  background: #0d0d0d !important;
  border: 1.5px solid #1e1e1e !important;
  border-radius: 12px !important;
  color: #888 !important;
  font-family: inherit !important;
  font-style: italic !important;
  font-weight: 900 !important;
  text-align: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.25s !important;
  box-sizing: border-box !important;
}

.day-tab svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}

.day-tab .day-num {
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
  text-align: center !important;
}

.day-tab small {
  font-size: 8.5px !important;
  color: #666 !important;
  font-weight: 700 !important;
  font-style: normal !important;
  text-align: center !important;
  line-height: 1 !important;
}

.day-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%) !important;
  border-color: #ff8533 !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5) !important;
  transform: translateY(-1px) !important;
}

.day-tab.active small { color: rgba(255, 255, 255, 0.9) !important; }

/* ========== PROGRESO ========== */
.progress-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding: 6px 2px 14px !important;
  margin-bottom: 16px !important;
  scrollbar-width: none !important;
  justify-content: center !important;
  align-items: center !important;
}
.progress-tabs::-webkit-scrollbar { display: none !important; }

.progress-tabs .p-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 10px 14px !important;
  min-width: 88px !important;
  flex-shrink: 0 !important;
  background: #0d0d0d !important;
  border: 1.5px solid #1e1e1e !important;
  border-radius: 12px !important;
  color: #888 !important;
  font-family: inherit !important;
  font-style: italic !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.25s !important;
  box-sizing: border-box !important;
}

.progress-tabs .p-tab svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

.progress-tabs .p-tab span {
  display: inline-block !important;
  text-align: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px !important;
}

.progress-tabs .p-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%) !important;
  border-color: #ff8533 !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ========== RETOS Y COMUNIDAD ========== */
.community-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding: 6px 2px 14px !important;
  margin-bottom: 16px !important;
  scrollbar-width: none !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}
.community-tabs::-webkit-scrollbar { display: none !important; }

.community-tabs .com-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 10px 14px !important;
  min-width: 78px !important;
  flex-shrink: 0 !important;
  background: #0d0d0d !important;
  border: 1.5px solid #1e1e1e !important;
  border-radius: 12px !important;
  color: #888 !important;
  font-family: inherit !important;
  font-style: italic !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.25s !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.community-tabs .com-tab svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  stroke: currentColor !important;
}

.community-tabs .com-tab span {
  display: inline-block !important;
  text-align: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px !important;
}

.community-tabs .com-tab.active {
  background: linear-gradient(135deg, #ff6b00 0%, #cc3700 100%) !important;
  border-color: #ff8533 !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 400px) {
  .day-tab { min-width: 62px !important; padding: 8px 10px !important; }
  .progress-tabs .p-tab { min-width: 76px !important; padding: 8px 10px !important; font-size: 9px !important; }
  .progress-tabs .p-tab span { font-size: 9px !important; }
  .community-tabs .com-tab { min-width: 68px !important; padding: 8px 10px !important; font-size: 9px !important; }
  .community-tabs .com-tab span { font-size: 9px !important; }
}

/* ========== AVATAR MÁS GRANDE Y SIN FONDO BLANCO ========== */
.header .avatar {
  background: transparent !important;
  background-color: transparent !important;
}

.header .avatar img {
  background: #1a1a1a !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ==========================================
   NUTRICIÓN COMPLETA — IDÉNTICA AL MOCKUP
   ========================================== */

/* ===== PLAN SEMANAL ===== */
.weekly-plan {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.weekly-day {
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  color: #888;
}

.weekly-day.active {
  background: linear-gradient(135deg, #ff6b00, #cc3700);
  border-color: #ff8533;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.5);
  transform: translateY(-2px);
}

.weekly-day-name {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.weekly-day-num {
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
  color: #fff;
}

.weekly-day:not(.active) .weekly-day-num {
  color: #aaa;
}

/* ===== TOTAL DIARIO ===== */
.total-daily-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

.total-daily-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
}

.total-daily-header span {
  font-size: 10px;
  color: #888;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.total-daily-header b {
  font-size: 18px;
  color: #ff6b00;
  font-weight: 900;
  font-style: italic;
}

.total-daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.total-daily-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.total-daily-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tdi-label {
  font-size: 9px;
  color: #888;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tdi-value {
  font-size: 13px;
  color: #fff;
  font-weight: 900;
  font-style: italic;
}

.total-daily-card .btn-orange-full {
  margin: 0;
}

/* ===== RECETAS DESTACADAS ===== */
.recipes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.recipe-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.recipe-card:active {
  transform: scale(0.97);
  border-color: #ff6b00;
}

.recipe-photo {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
}

.recipe-info {
  padding: 8px;
}

.recipe-name {
  font-size: 9.5px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.2;
}

.recipe-meta {
  font-size: 8.5px;
  color: #888;
  font-weight: 600;
}

/* ===== REGISTRO DE COMIDAS CON CÁMARA ===== */
.meal-log-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.meal-log-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.ml-tab {
  padding: 10px;
  background: #1a1a1a;
  border: 1.5px solid transparent;
  border-radius: 8px;
  color: #888;
  font-size: 11px;
  font-weight: 900;
  font-family: inherit;
  font-style: italic;
  cursor: pointer;
  transition: all 0.25s;
}

.ml-tab.active {
  background: linear-gradient(135deg, #ff6b00, #cc3700);
  color: #fff;
  border-color: #ff8533;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.meal-log-content {
  text-align: center;
  padding: 20px 10px;
}

.camera-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.camera-text {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ===== RECOMENDACIONES AI ===== */
.ai-recommendation-card {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.1), transparent);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.ai-rec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-rec-icon {
  font-size: 20px;
}

.ai-rec-title {
  font-size: 11px;
  font-weight: 900;
  color: #ff6b00;
  letter-spacing: 1.2px;
}

.ai-rec-content {
  font-size: 12px;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 12px;
}

.ai-rec-content b {
  color: #ff6b00;
}

/* ===== SEGUIMIENTO NUTRICIONAL ===== */
.nutrition-tracking-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.nt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 11px;
  color: #aaa;
  font-weight: 700;
}

.nt-badge {
  font-size: 10px;
  color: #10b981;
  font-weight: 900;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.nt-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  height: 80px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.nt-bar {
  background: #1a1a1a;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s;
}

.nt-bar.active {
  background: linear-gradient(180deg, #ff6b00, #cc3700);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.6);
}

.nt-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 9px;
  color: #666;
  font-weight: 800;
  margin-bottom: 14px;
}

.nutrition-tracking-card .btn-orange-full {
  margin: 0;
}

/* ===== AJUSTE DEL MEAL ITEM (MÁS GRANDE) ===== */
.meal-item {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  align-items: center;
}

.meal-photo {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.meal-type {
  font-size: 9px;
  color: #ff6b00;
  font-weight: 900;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}

.meal-name {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
  line-height: 1.3;
}

.meal-macros {
  display: flex;
  gap: 8px;
  font-size: 9.5px;
  color: #aaa;
  font-weight: 700;
  flex-wrap: wrap;
}

.meal-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #333;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #10b981;
  cursor: pointer;
  transition: all 0.2s;
}

.meal-check.done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* ==========================================
   GAINZ AI — IDÉNTICO AL MOCKUP
   ========================================== */

/* ===== HERO CON CYBORG ===== */
.ai-hero-new {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a00 50%, #0a0a0a 100%);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  align-items: center;
}

.ai-hero-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.15), transparent 60%);
  pointer-events: none;
}

.ai-hero-left {
  position: relative;
  z-index: 2;
  flex: 1;
}

.ai-logo-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-brain-icon {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.9));
  animation: brainPulse 3s ease-in-out infinite;
}

@keyframes brainPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.9)); }
  50% { filter: drop-shadow(0 0 24px rgba(255, 107, 0, 1)); }
}

.ai-hero-title h1 {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  color: #fff;
  margin: 0 0 4px 0;
  line-height: 1;
}

.ai-hero-title h1 span {
  background: linear-gradient(180deg, #ffb347 0%, #ff6b00 50%, #cc3700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.7));
}

.ai-hero-title p {
  font-size: 10px;
  color: #ff6b00;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0;
}

/* ===== CYBORG IMAGE ===== */
.ai-hero-cyborg {
  position: absolute;
  right: -20px;
  top: 0;
  bottom: 0;
  width: 180px;
  background: url('https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?w=600&q=90&auto=format&fit=crop') center/cover;
  opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent 0%, black 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 40%);
  filter: saturate(1.3) contrast(1.15) brightness(0.9);
  z-index: 1;
}

.ai-hero-cyborg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.2), transparent);
  animation: cyborgGlow 3s ease-in-out infinite;
}

@keyframes cyborgGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ===== WELCOME CHAT ===== */
.ai-welcome-new {
  display: flex;
  gap: 12px;
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-welcome-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 107, 0, 0.1);
  border: 1.5px solid rgba(255, 107, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-welcome-avatar svg {
  width: 26px;
  height: 26px;
}

.ai-welcome-msg-new {
  font-size: 13px;
  color: #ccc;
  line-height: 1.6;
  flex: 1;
}

.ai-welcome-msg-new b {
  color: #fff;
  font-weight: 800;
}

.ai-welcome-msg-new span {
  color: #ff6b00;
}

/* ===== QUICK QUESTIONS GRID ===== */
.ai-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-q-card {
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ai-q-card:active {
  transform: scale(0.97);
}

.ai-q-card:hover {
  border-color: rgba(255, 107, 0, 0.5);
  background: rgba(255, 107, 0, 0.03);
}

.ai-q-icon-svg {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 0, 0.08);
  border: 1.5px solid rgba(255, 107, 0, 0.4);
  border-radius: 10px;
  flex-shrink: 0;
}

.ai-q-icon-svg svg {
  width: 20px;
  height: 20px;
}

.ai-q-content {
  flex: 1;
}

.ai-q-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.2;
}

.ai-q-desc {
  font-size: 10px;
  color: #888;
  line-height: 1.3;
}

/* ===== FEATURE BAR ===== */
.ai-feature-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(255, 107, 0, 0.03));
  border: 1.5px solid rgba(255, 107, 0, 0.35);
  border-radius: 12px;
  padding: 12px 10px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.ai-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 900;
  color: #ff6b00;
  letter-spacing: 1.5px;
  font-style: italic;
}

.ai-feature-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-feature-icon svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 6px rgba(255, 107, 0, 0.6));
}

.ai-feature-sep {
  width: 4px;
  height: 4px;
  background: rgba(255, 107, 0, 0.5);
  border-radius: 50%;
}

/* ===== CHAT ===== */
.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #262626 transparent;
}

.ai-chat::-webkit-scrollbar {
  width: 4px;
}

.ai-chat::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 2px;
}

.ai-msg {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  animation: msgIn 0.3s ease;
  word-wrap: break-word;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg.user {
  background: linear-gradient(135deg, #ff6b00, #ff8533);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.ai-msg.ai {
  background: #1a1a1a;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #262626;
}

.ai-msg.ai b {
  color: #ff6b00;
  font-weight: 900;
}

.ai-msg-time {
  font-size: 9px;
  opacity: 0.6;
  margin-top: 5px;
  text-align: right;
}

/* ===== INPUT ROW ===== */
.ai-input-row {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #1a1a1a;
  margin-top: 8px;
}

.ai-input-row input {
  flex: 1;
  padding: 13px 18px;
  background: #0d0d0d;
  border: 1.5px solid #1e1e1e;
  border-radius: 26px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.ai-input-row input:focus {
  outline: none;
  border-color: #ff6b00;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.2);
}

.ai-input-row input::placeholder {
  color: #666;
}

.ai-send {
  background: linear-gradient(135deg, #ff6b00, #cc3700);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.5);
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-send:active {
  transform: scale(0.92);
}

.ai-send:hover {
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.7);
  transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 380px) {
  .ai-hero-title h1 { font-size: 24px; }
  .ai-hero-cyborg { width: 140px; }
  .ai-brain-icon { width: 46px; height: 46px; }
  .ai-feature { font-size: 9px; letter-spacing: 1px; }
  .ai-feature-icon svg { width: 16px; height: 16px; }
}

/* ==========================================
   SISTEMA DE VISTAS — FIX SANGRADO ENTRE SECCIONES
   ========================================== */

/* Ocultar TODAS las secciones por defecto */
.view,
section.view {
  display: none !important;
  visibility: hidden !important;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* Mostrar SOLO la sección activa */
.view.active,
section.view.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1;
  height: auto;
  min-height: auto;
  overflow: visible;
  pointer-events: auto;
  position: relative;
  animation: viewFadeIn 0.3s ease;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* El main debe crecer con el contenido */
.main {
  min-height: calc(100vh - 200px);
  padding-bottom: 100px;
  position: relative;
}

/* ==========================================
   SISTEMA DE VISTAS — VERSIÓN SIMPLE
   ========================================== */

/* Ocultar todas las secciones por defecto */
.view {
  display: none;
}

/* Mostrar solo la activa */
.view.active {
  display: block;
  animation: viewFadeIn 0.3s ease;
}

/* El main crece con el contenido */
.main {
  padding: 16px 18px 24px;
  min-height: calc(100vh - 160px);
}

/* ==========================================
   FIX: DAY GRID VISIBLE
   ========================================== */
#dashboard .day-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 18px !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

#dashboard .day-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #0d0d0d !important;
  border-radius: 13px !important;
  padding: 13px 11px !important;
  min-height: 100px !important;
}

#dashboard .day-icon {
  display: block !important;
  font-size: 18px !important;
  margin-bottom: 8px !important;
}

#dashboard .day-label {
  display: block !important;
  font-size: 8.5px !important;
  color: #777 !important;
  margin-bottom: 6px !important;
}

#dashboard .day-value {
  display: block !important;
  font-size: 10px !important;
  color: #777 !important;
  margin-bottom: 8px !important;
}

#dashboard .day-bar {
  display: block !important;
  height: 4px !important;
  background: #1a1a1a !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

#dashboard .day-fill {
  display: block !important;
  height: 100% !important;
  border-radius: 2px !important;
}

/* ==========================================
   FIX: BANNER VISIBLE
   ========================================== */
#dashboard .banner {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 120px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  margin-bottom: 18px !important;
  position: relative !important;
  border: 1px solid rgba(255, 107, 0, 0.25) !important;
}

#dashboard .banner-text {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  z-index: 1 !important;
}

#dashboard .banner-text div {
  display: block !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  font-style: italic !important;
}

#dashboard .banner-photo {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
}

/* ==========================================
   FIX DEFINITIVO — DASHBOARD VISIBLE
   ========================================== */

/* Forzar que TODO el dashboard se vea */
#dashboard {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
  position: relative !important;
}

/* El hero */
#dashboard .hero {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 210px !important;
  overflow: visible !important;
  position: relative !important;
}

/* El card workout */
#dashboard .card-workout {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 350px !important;
  overflow: hidden !important;
  position: relative !important;
  margin-bottom: 18px !important;
}

#dashboard .card-workout .card-photo {
  display: block !important;
  height: 140px !important;
  position: relative !important;
}

#dashboard .card-workout .card-body {
  display: block !important;
  padding: 0 18px 18px !important;
}

#dashboard .card-workout .card-actions {
  display: flex !important;
  gap: 8px !important;
}

/* Quick cards */
#dashboard .quick-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-bottom: 24px !important;
}

#dashboard .quick-card {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 120px !important;
  padding: 14px !important;
}

/* Section head */
#dashboard .section-head {
  display: flex !important;
  justify-content: space-between !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 8px 0 12px !important;
}

/* Day grid */
#dashboard .day-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-bottom: 18px !important;
}

#dashboard .day-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 100px !important;
  padding: 13px 11px !important;
  background: #0d0d0d !important;
  border-radius: 13px !important;
}

/* Banner */
#dashboard .banner {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 120px !important;
  min-height: 120px !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 18px !important;
  border-radius: 16px !important;
}

#dashboard .banner-photo {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
}

#dashboard .banner-text {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Asegurar el main */
.main {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: calc(100vh - 100px) !important;
  overflow: visible !important;
  position: relative !important;
  padding: 16px 18px 24px !important;
}

/* ==========================================
   FIX FINAL — PERMITIR SCROLL EN TODAS LAS VISTAS
   ========================================== */

/* El .view.active NO debe cortar el contenido */
.view.active {
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
}

/* El main permite scroll completo */
.main {
  display: block !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  min-height: calc(100vh - 100px) !important;
  padding: 16px 18px 100px !important;
  position: relative !important;
}

/* El body permite scroll */
body, html {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
}

/* El app container permite scroll */
.app {
  overflow: visible !important;
  min-height: 100vh !important;
  height: auto !important;
  padding-bottom: 100px !important;
}

/* TODOS los hijos directos de .view se ven */
.view > * {
  display: revert !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Y sus nietos también */
.view > * > * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hero permite su contenido */
.hero {
  overflow: visible !important;
  height: auto !important;
  min-height: 210px !important;
  display: block !important;
}

/* Card workout y todo lo demás visibles */
.card-workout,
.quick-grid,
.section-head,
.day-grid,
.banner,
.progress-metrics-grid,
.chart-box,
.composition-section,
.constancy-section,
.goal-section,
.pr-grid,
.workout-hero,
.day-tabs,
.exercise-list,
.ai-page-hero,
.ai-welcome,
.ai-quick-questions,
.ai-features-bar,
.ai-chat,
.ai-input-row,
.nutrition-hero,
.macros-row,
.nut-quick-grid,
.meal-list,
.water-progress-card,
.progress-tabs,
.progress-hero,
.challenge-tabs,
.featured-challenge,
.challenge-grid,
.level-display,
.friend-challenge-card,
.community-tabs,
.stories-row,
.community-hero,
.feed-list,
.ranking-card,
.achievements-row,
.profile-hero,
.input-group {
  display: revert !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
}

/* Excepciones: los que SÍ deben ser grid o flex */
.quick-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

.day-grid,
.progress-metrics-grid,
.macros-row,
.nut-quick-grid,
.progress-week-grid,
.challenge-grid,
.pr-grid {
  display: grid !important;
}

.section-head,
.water-header,
.card-actions,
.ai-input-row,
.water-actions,
.ranking-tabs,
.community-tabs,
.challenge-tabs,
.progress-tabs,
.day-tabs,
.stories-row {
  display: flex !important;
}

.progress-metrics-grid {
  grid-template-columns: 1fr 1fr !important;
}

.day-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.macros-row {
  grid-template-columns: repeat(3, 1fr) !important;
}

.nut-quick-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}

.challenge-grid {
  grid-template-columns: 1fr 1fr !important;
}

.pr-grid {
  grid-template-columns: 1fr 1fr !important;
}

.progress-week-grid {
  grid-template-columns: 1fr 1fr !important;
}

/* ==========================================
   FIX CRÍTICO — FORZAR SCROLL Y ALTURA
   ========================================== */

html {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
  position: static !important;
}

.app {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  position: relative !important;
}

.main {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  position: relative !important;
  padding-bottom: 120px !important;
}

.view,
.view.active {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  position: relative !important;
}

/* El nav no debe ser position absolute */
.nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* El header no debe cortar */
.header {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* TODOS los contenedores de secciones visibles */
#dashboard,
#workouts,
#ai,
#nutrition,
#progress,
#challenges,
#community,
#profile {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}