/* ============================================================
   FISGOU PEGOU — Main Stylesheet
   ============================================================ */

:root {
  --bg:        #0f1109;
  --bg2:       #161a0e;
  --bg3:       #1e2414;
  --card:      #1a1e12;
  --card2:     #222818;
  --border:    #2d3520;
  --gold:      #c8a84b;
  --gold2:     #e0c063;
  --green:     #4caf50;
  --green2:    #2e7d32;
  --green-dim: #1b3a1e;
  --orange:    #e07b39;
  --red:       #e05252;
  --text:      #e8e4d4;
  --text2:     #a09880;
  --text3:     #6b6352;
  --radius:    16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* SPLASH */
.splash {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  animation: splashOut 0.5s ease 1.8s forwards;
}
@keyframes splashOut { to { opacity: 0; pointer-events: none; } }
.splash-logo { font-size: 2.4rem; }
.splash-tagline { color: var(--text2); font-size: 0.9rem; animation: fadeUp 0.6s ease 0.4s both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* APP SHELL */
.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  max-width: 480px; margin: 0 auto;
}
.app.hidden { opacity: 0; animation: fadeIn 0.4s ease 2.1s forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* LOGO */
.logo-text  { font-family: 'Playfair Display', serif; color: var(--text); font-style: italic; }
.logo-pegou { font-family: 'Playfair Display', serif; color: var(--gold); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }

/* TOP BAR */
.top-bar {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative; flex-shrink: 0;
}
.logo-small { font-size: 1.2rem; }
.back-btn {
  position: absolute; left: 16px;
  background: none; border: none;
  color: var(--text2); font-size: 0.9rem;
  cursor: pointer; padding: 4px 8px;
  border-radius: 8px; transition: background 0.2s;
}
.back-btn:hover { background: var(--bg3); }
.back-btn.hidden { display: none; }

/* PAGES */
.page { flex: 1; overflow-y: auto; display: none; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.page.active { display: block; }
.page-inner { padding: 20px 16px 100px; }
.page-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 4px; }
.page-sub { color: var(--text2); font-size: 0.85rem; margin-bottom: 20px; }

/* CARDS */
.form-card, .section-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.form-card { display: flex; flex-direction: column; gap: 10px; }

/* FORM */
.form-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 2px; }
.form-input, .form-select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 11px 14px; font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
  appearance: none; -webkit-appearance: none;
}
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09880' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-input:focus, .form-select:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--text3); }
.loc-row { display: flex; gap: 8px; }
.loc-row .form-input { flex: 1; }
.loc-hint { font-size: 0.75rem; color: var(--text3); }
.btn-loc { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); padding: 11px 12px; font-size: 0.78rem; cursor: pointer; white-space: nowrap; transition: border-color 0.2s, color 0.2s; }
.btn-loc:hover { border-color: var(--gold); color: var(--gold); }
.map-preview { border-radius: var(--radius-sm); overflow: hidden; height: 140px; background: var(--bg3); border: 1px solid var(--border); }
.map-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text3); gap: 6px; }
.map-placeholder span { font-size: 2rem; }
.map-placeholder p { font-size: 0.8rem; }
.saved-locs { display: flex; gap: 8px; flex-wrap: wrap; }
.saved-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; color: var(--text2); cursor: pointer; transition: all 0.2s; }
.saved-chip.active { border-color: var(--green); color: var(--green); }

/* DATE STRIP */
.date-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.date-scroll::-webkit-scrollbar { display: none; }
.date-chip { flex-shrink: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; text-align: center; min-width: 60px; transition: all 0.2s; }
.date-chip span { display: block; font-size: 0.7rem; color: var(--text2); }
.date-chip strong { font-size: 1rem; color: var(--text); }
.date-chip.active { background: var(--green2); border-color: var(--green); }
.date-chip.active span, .date-chip.active strong { color: #fff; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* BUTTONS */
.btn-primary, .btn-gold, .btn-secondary, .btn-outline, .btn-danger {
  border: none; border-radius: var(--radius-sm);
  padding: 14px 20px; font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--gold); color: #0f1109; }
.btn-gold    { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #0f1109; }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary { background: var(--green2); color: #fff; border: 1px solid var(--green); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--text2); color: var(--text); }
.btn-danger  { background: transparent; border: 1px solid #4a1c1c; color: var(--red); }
.btn-full { width: 100%; display: block; }
.mt8 { margin-top: 8px; }

/* RESULT HERO */
.result-hero { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px 10px; text-align: center; margin-bottom: 14px; }
.fish-img { font-size: 3.5rem; margin-bottom: 8px; display: block; }
.fish-name { font-family: 'Playfair Display', serif; font-size: 2rem; }
.res-location { color: var(--gold); font-size: 0.9rem; margin-top: 4px; }
.res-date { color: var(--text2); font-size: 0.85rem; margin-top: 2px; }

/* GAUGE */
.gauge-wrap { position: relative; width: 200px; margin: 16px auto 8px; }
.gauge-svg { width: 100%; }
.gauge-score { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.score-num { display: block; font-family: 'Playfair Display', serif; font-size: 3.5rem; color: var(--text); line-height: 1; }
.score-label { display: block; font-size: 1rem; color: var(--text); margin-top: 4px; }
.score-desc  { display: block; font-size: 0.78rem; color: var(--text2); margin-top: 2px; }

/* TABS */
.tabs-wrap { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; margin-bottom: 2px; }
.tabs-wrap::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text3); font-size: 0.78rem; letter-spacing: 0.08em; padding: 8px 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: all 0.2s; }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* FACTORS */
.section-title { font-weight: 600; font-size: 1rem; color: var(--text); margin-bottom: 14px; }
.factors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.factor-item { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.factor-header { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text2); margin-bottom: 4px; }
.factor-score { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.factor-score.green  { color: var(--green); }
.factor-score.orange { color: var(--orange); }
.factor-bar { height: 3px; background: var(--border); border-radius: 3px; margin-bottom: 6px; }
.factor-bar-fill { height: 100%; border-radius: 3px; }
.factor-bar-fill.green  { background: var(--green); }
.factor-bar-fill.orange { background: var(--orange); }
.factor-desc { font-size: 0.68rem; color: var(--text3); }

/* IA CARD */
.ia-card { border-color: var(--gold); }
.premium-badge { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.06em; margin-bottom: 6px; }
.ia-preview { color: var(--text2); font-size: 0.9rem; margin-bottom: 12px; }

/* GOLD LOCK CARD */
.gold-lock-card { text-align: center; }
.gold-icon { font-size: 2rem; margin-bottom: 8px; }
.gold-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold); margin-bottom: 6px; }
.gold-desc { color: var(--text2); font-size: 0.85rem; margin-bottom: 14px; }

/* 3 DAYS */
.three-days-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pressure-badge { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 0.7rem; color: var(--text2); }
.three-days-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.day-col { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.day-col.today { border-color: var(--gold); }
.day-label { font-size: 0.7rem; color: var(--text2); text-transform: uppercase; }
.day-score { font-size: 2.2rem; font-weight: 700; color: var(--text); margin: 4px 0; }
.day-sub-label { font-size: 0.65rem; color: var(--text3); margin-bottom: 8px; }
.day-details { font-size: 0.7rem; color: var(--text2); line-height: 1.8; }
.chart-note { font-size: 0.7rem; color: var(--text3); margin-top: 6px; text-align: center; }
.no-rain { color: var(--green); font-size: 0.9rem; text-align: center; padding: 20px 0; }

/* LUNAR */
.lunar-card { text-align: center; }
.moon-display { margin: 16px 0; }
.moon-emoji  { font-size: 4rem; }
.moon-illum  { font-size: 2rem; font-weight: 700; }
.moon-phase-name { font-size: 0.85rem; color: var(--text2); letter-spacing: 0.1em; margin-top: 4px; }
.lunar-times { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin: 16px 0; }
.ltime { display: flex; flex-direction: column; gap: 3px; }
.ltime span { font-size: 0.6rem; color: var(--text3); text-transform: uppercase; }
.ltime strong { font-size: 0.9rem; }
.solunar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.solunar-chip { border-radius: 20px; padding: 6px 10px; font-size: 0.72rem; text-align: center; }
.solunar-chip.major { background: var(--green-dim); border: 1px solid var(--green2); color: var(--green); }
.solunar-chip.minor { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.combo-tip { background: var(--green-dim); border: 1px solid var(--green2); border-radius: var(--radius-sm); padding: 10px; font-size: 0.8rem; color: var(--green); }

/* WEATHER */
.weather-now { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.weather-temp { display: flex; align-items: center; gap: 10px; }
.w-icon { font-size: 2rem; }
.w-temp { font-size: 2rem; font-weight: 700; }
.w-desc { font-size: 0.85rem; color: var(--text2); }
.w-range { font-size: 0.8rem; color: var(--text2); }
.hourly-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.hourly-strip::-webkit-scrollbar { display: none; }
.h-item { flex-shrink: 0; text-align: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 48px; }
.h-item.now { border-color: var(--gold); }
.h-time { font-size: 0.65rem; color: var(--text3); }
.h-icon { font-size: 1.1rem; margin: 4px 0; }
.h-temp { font-size: 0.8rem; font-weight: 600; }
.windy-embed { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); height: 160px; background: var(--bg3); }
.windy-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text3); }
.windy-placeholder span { font-size: 2rem; }
.windy-placeholder p   { font-size: 0.85rem; }
.windy-link { font-size: 0.8rem; color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold); }
.bottom-action { padding: 16px 0 0; }

/* LOCAIS */
.local-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.local-item:last-child { border-bottom: none; }
.local-icon { font-size: 1.2rem; }
.local-info { flex: 1; }
.local-info strong { display: block; font-size: 0.95rem; }
.local-info span   { font-size: 0.8rem; color: var(--text2); }
.arrow { color: var(--text3); font-size: 1.2rem; }
.premium-locais { display: flex; align-items: center; justify-content: space-between; background: var(--green-dim); border: 1px solid var(--green2); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 8px; font-size: 0.82rem; color: var(--green); cursor: pointer; }

/* ALERTAS */
.premium-feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; text-align: center; }
.pf-icon { font-size: 3rem; margin-bottom: 12px; }
.premium-feature-card h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 10px; }
.premium-feature-card p { color: var(--text2); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }

/* HISTORY */
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color 0.2s; }
.hist-item:hover { border-color: var(--gold); }
.hist-score { font-size: 1.5rem; font-weight: 700; min-width: 36px; text-align: center; }
.hist-info { flex: 1; }
.hist-info strong { display: block; font-size: 0.9rem; }
.hist-info span   { font-size: 0.78rem; color: var(--text2); }
.hist-fb { font-size: 0.72rem; color: var(--text3); }

/* CONTA */
.user-card { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.user-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--green2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: #fff; }
.user-info { flex: 1; }
.user-info strong { display: block; font-size: 0.95rem; }
.user-info span   { font-size: 0.8rem; color: var(--text2); }
.plan-badge { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; color: var(--text2); font-weight: 600; }
.premium-upsell { background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.pu-title { color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.premium-upsell p { color: var(--text2); font-size: 0.85rem; margin-bottom: 12px; }
.pu-list { list-style: none; margin-bottom: 14px; }
.pu-list li { font-size: 0.82rem; color: var(--text2); padding: 3px 0; }
.pu-price { font-size: 1rem; margin-bottom: 14px; }
.pu-price strong { font-size: 1.4rem; color: var(--gold); }
.pu-price span { font-size: 0.8rem; color: var(--text3); }
.prefs-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.species-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; margin-bottom: 8px; }
.species-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; color: var(--text2); cursor: pointer; transition: all 0.2s; }
.species-chip.active { background: var(--green2); border-color: var(--green); color: #fff; }
.see-all-link { font-size: 0.8rem; color: var(--gold); cursor: pointer; }
.menu-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); cursor: pointer; font-size: 0.9rem; }
.menu-row:hover { color: var(--gold); }
.badge-pm { background: var(--green-dim); border: 1px solid var(--green2); border-radius: 20px; padding: 3px 10px; font-size: 0.7rem; color: var(--gold); }
.small-note { font-size: 0.75rem; color: var(--text3); margin: 6px 0; }
.menu-link { display: block; color: var(--text2); font-size: 0.9rem; padding: 6px 0; cursor: pointer; }
.menu-link:hover { color: var(--gold); }

/* PLANS */
.plan-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 4px; }
.premium-plan { border-color: var(--gold); }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.plan-name { font-weight: 700; font-size: 1.1rem; }
.plan-price { font-size: 1.1rem; color: var(--gold); font-weight: 700; }
.plan-features { list-style: none; margin-bottom: 14px; }
.plan-features li { font-size: 0.85rem; color: var(--text2); padding: 4px 0; }
.plan-note { font-size: 0.78rem; color: var(--text3); margin-bottom: 10px; }
.plan-badge-wrap { text-align: center; margin: 8px 0; }
.recommended-badge { background: var(--gold); color: #0f1109; border-radius: 20px; padding: 4px 16px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; }
.coupon-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.coupon-row { display: flex; gap: 8px; margin-top: 6px; }
.btn-apply { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); padding: 11px 16px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-apply:hover { border-color: var(--gold); color: var(--gold); }

/* PAYMENT */
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg3); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 16px; }
.pay-tab { background: none; border: none; border-radius: calc(var(--radius-sm) - 2px); color: var(--text2); padding: 10px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; cursor: pointer; transition: all 0.2s; }
.pay-tab.active { background: var(--green2); color: #fff; }
.pay-content { display: none; }
.pay-content.active { display: block; }
.pay-summary { text-align: center; color: var(--text2); font-size: 0.9rem; margin-bottom: 14px; }
.form-section-title { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text3); text-transform: uppercase; margin: 4px 0 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-footer { text-align: center; font-size: 0.75rem; color: var(--text3); margin-top: 12px; line-height: 1.5; }
.pay-footer a { color: var(--gold); }
.pix-qr { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; margin: 14px 0; }
.pix-qr.hidden { display: none; }
.qr-placeholder { width: 160px; height: 160px; background: var(--bg3); border: 2px dashed var(--border); border-radius: 10px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 0.85rem; }
.pix-qr p { color: var(--text2); font-size: 0.85rem; }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: var(--bg2); border-top: 1px solid var(--border); padding: 6px 0 max(8px, env(safe-area-inset-bottom)); z-index: 100; }
.nav-btn { flex: 1; background: none; border: none; color: var(--text3); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.65rem; transition: color 0.2s; }
.nav-btn.active { color: var(--gold); }
.nav-icon { font-size: 1.3rem; }
.nav-center { position: relative; top: -14px; }
.nav-icon-center { width: 52px; height: 52px; background: linear-gradient(135deg, var(--gold), var(--gold2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #0f1109; font-size: 1.4rem; box-shadow: 0 4px 20px rgba(200,168,75,0.4); }

/* TOAST */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 20px; font-size: 0.85rem; color: var(--text); z-index: 999; white-space: nowrap; animation: toastIn 0.3s ease, toastOut 0.3s ease 2.4s forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(-50%) translateY(10px); } }

@media (min-width: 480px) { .app { box-shadow: 0 0 60px rgba(0,0,0,0.6); } }
