/* Nativo App Pages — Dark App Style */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0F172A;
  --card: #1E293B;
  --card2: #263244;
  --border: rgba(255,255,255,0.08);
  --orange: #FF4D00;
  --purple: #7C3AED;
  --green: #22C55E;
  --text: #F8FAFC;
  --muted: rgba(255,255,255,0.5);
  --dim: rgba(255,255,255,0.25);
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; padding-bottom: 80px; }

.app { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* NAV */
.app-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.app-logo { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--text); text-decoration: none; }
.app-logo span { color: var(--orange); }
.app-nav-links { display: flex; gap: 16px; align-items: center; }
.app-nav-links a { text-decoration: none; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.app-nav-links a:hover { color: var(--text); }
.app-nav-cta { background: var(--orange) !important; color: #fff !important; padding: 8px 18px; border-radius: 100px; font-weight: 600 !important; }

/* PAGE TITLE */
.page-hero { text-align: center; padding: 24px 0 28px; }
.page-eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); background: rgba(255,77,0,0.1); padding: 4px 12px; border-radius: 100px; margin-bottom: 12px; }
.page-title { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 10px; }
.page-title em { font-style: normal; color: var(--orange); }
.page-sub { font-size: 0.95rem; color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* CARDS */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.card-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; display: block; }
.label-orange { color: var(--orange); }
.label-muted { color: var(--dim); }
.label-green { color: var(--green); }
.label-purple { color: #A78BFA; }
.card-phrase { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.card-note { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* LANG PILLS */
.lang-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.lang-pill { padding: 6px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 600; border: 1.5px solid var(--border); color: var(--muted); cursor: pointer; white-space: nowrap; background: transparent; transition: all 0.15s; }
.lang-pill:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.lang-pill.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* INPUT */
.input-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
textarea, input[type=text] {
  width: 100%; background: rgba(255,255,255,0.05); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px; font-size: 0.95rem; color: var(--text);
  font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.15s; resize: vertical;
}
textarea:focus, input[type=text]:focus { border-color: var(--orange); }
textarea::placeholder, input::placeholder { color: rgba(255,255,255,0.2); }

/* EXAMPLE CHIPS */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.chip { padding: 4px 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 100px; font-size: 0.75rem; color: var(--muted); cursor: pointer; transition: all 0.15s; }
.chip:hover { background: rgba(255,77,0,0.1); border-color: rgba(255,77,0,0.3); color: var(--orange); }

/* BUTTONS */
.btn-primary { display: block; width: 100%; background: var(--orange); color: #fff; border: none; border-radius: 100px; padding: 14px; font-size: 1rem; font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer; text-align: center; text-decoration: none; transition: all 0.2s; margin-top: 12px; }
.btn-primary:hover { background: #e04400; transform: translateY(-1px); }
.btn-primary:disabled { background: rgba(255,255,255,0.1); color: var(--muted); cursor: not-allowed; transform: none; }
.btn-secondary { display: block; width: 100%; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 100px; padding: 12px; font-size: 0.92rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; text-align: center; text-decoration: none; margin-top: 8px; transition: all 0.15s; }
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }

/* BADGE */
.badge { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 100px; }
.badge-orange { background: rgba(255,77,0,0.15); color: var(--orange); }
.badge-purple { background: rgba(124,58,237,0.15); color: #A78BFA; }
.badge-green { background: rgba(34,197,94,0.12); color: #4ADE80; }

/* ALT RESULT CARD */
.alt-card { border: 1.5px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; transition: border-color 0.15s; }
.alt-card.featured { border-color: rgba(255,77,0,0.35); background: rgba(255,77,0,0.06); }
.alt-phrase { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.alt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.8rem; }
.alt-detail-label { font-weight: 600; color: rgba(255,255,255,0.6); margin-bottom: 3px; }
.alt-detail-val { color: var(--muted); line-height: 1.5; }
.copy-btn { background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; padding: 4px 12px; font-size: 0.72rem; color: var(--muted); cursor: pointer; margin-top: 10px; transition: all 0.15s; font-family: 'Inter', sans-serif; }
.copy-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* LOADING */
.loading { display: flex; gap: 6px; justify-content: center; padding: 32px 0; }
.dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-8px)} }

/* CHAT */
.chat-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; min-height: 320px; max-height: 480px; overflow-y: auto; }
.msg-ai .bubble { background: var(--card); color: rgba(255,255,255,0.85); border-radius: 16px 16px 16px 4px; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .bubble { background: var(--orange); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble { display: inline-block; padding: 10px 14px; font-size: 0.9rem; line-height: 1.55; max-width: 85%; }
.correction { background: rgba(255,77,0,0.08); border: 1px solid rgba(255,77,0,0.2); border-radius: 10px; padding: 8px 12px; margin-top: 6px; font-size: 0.8rem; color: var(--orange); line-height: 1.5; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.chat-input { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 100px; padding: 10px 16px; font-size: 0.9rem; color: var(--text); font-family: 'Inter', sans-serif; outline: none; }
.chat-input:focus { border-color: var(--orange); }
.send-btn { background: var(--orange); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 1rem; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

/* TIMER */
.timer-wrap { display: flex; justify-content: center; margin: 16px 0; }
.timer-ring { position: relative; width: 80px; height: 80px; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--orange); }

/* PHRASE ITEM */
.phrase-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.15s; }
.phrase-item:hover { border-color: rgba(255,255,255,0.15); }
.phrase-native { font-size: 0.98rem; font-weight: 700; margin-bottom: 4px; }
.phrase-meaning { font-size: 0.82rem; color: var(--muted); }
.phrase-textbook { font-size: 0.75rem; color: var(--dim); font-style: italic; margin-top: 2px; }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #080F1E; border-top: 1px solid var(--border); display: flex; z-index: 100; padding: 8px 0 12px; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--dim); font-size: 0.65rem; font-weight: 500; }
.nav-item.active, .nav-item:hover { color: var(--orange); }
.nav-icon { font-size: 1.2rem; }

/* DIVIDER */
hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* USAGE COUNTER */
.usage-bar { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.usage-count { color: var(--orange); font-weight: 700; }
.upgrade-link { color: #A78BFA; font-weight: 600; text-decoration: none; font-size: 0.75rem; }

.hidden { display: none; }
.divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

@media(max-width:600px) { .alt-grid { grid-template-columns: 1fr; } .app-nav-links a:not(.app-nav-cta) { display: none; } }
