/* ================= ROOT VARIABLES ================= */
:root {
  --bg: #f9fafb;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.9);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border: #e5e7eb;
  --accent: #2563eb;

  --radius-lg: 1.25rem;
  --radius-md: 0.85rem;

  --shadow-sm: 0 6px 18px rgba(0,0,0,0.06);
  --shadow-md: 0 14px 40px rgba(0,0,0,0.12);
}

/* ================= DARK / DIM ================= */
body.dim {
  --bg: #0f172a;
  --bg-card: #020617;
  --bg-nav: rgba(2, 6, 23, 0.8);

  --text-primary: #e5e7eb;
  --text-secondary: #cbd5f5;
  --text-muted: #94a3b8;

  --border: #1e293b;
}

body.dark {
  --bg: #020617;
  --bg-card: #020617;
  --bg-nav: rgba(2, 6, 23, 0.9);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5f5;
  --text-muted: #94a3b8;

  --border: #1e293b;
}

/* ================= BASE ================= */
html {
  scroll-behavior: smooth;
}

body.app {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================= HEADER ================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ================= LANGUAGE SELECT ================= */
.lang-select {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ================= MAIN ================= */
.app-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 6rem;
}

/* ================= SECTIONS ================= */
.section {
  margin-top: 3rem;
}

.section-intro {
  margin-top: 1.2rem;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ================= CARDS ================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-center {
  text-align: center;
}

.card-final {
  border-style: dashed;
}

/* ================= GRID ================= */
.card-grid {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= TIP CARDS ================= */
.tip-card {
  position: relative;
}

.tip-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.tip-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tip-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ================= FINAL ================= */
.final-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.final-text {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ================= NAV ================= */

/* ---- Nav ---- end ---*/
/* ================= iOS NAV ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(96%, 520px);
  margin-bottom: 0.6rem;

  background: var(--bg-nav);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 1.6rem;

  display: flex;
  justify-content: space-around;
  padding: 0.65rem 0.4rem;

  box-shadow:
    0 18px 45px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.05);

  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
}

/* ================= NAV ITEMS ================= */
.nav-item {
  position: relative;
  padding: 0.5rem 0.9rem;
  border-radius: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s cubic-bezier(.22,1,.36,1);
}

/* ================= ACTIVE PILL ================= */
.nav-item.active {
  background: rgba(37,99,235,0.12);
  color: var(--accent);
}

/* ================= TAP FEEDBACK ================= */
.nav-item:active {
  transform: scale(0.92);
}



/* -- filter Nav Blur -- */

.mobile-nav {
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,0,0,.08);
}



body.dim .mobile-nav {
    backdrop-filter: blur(16px);
   border-top: 1px solid rgba(0,0,0,.08);
   background-color: #1f29374b;
}


body.dark .mobile-nav {
    backdrop-filter: blur(16px);
   border-top: 1px solid rgba(0,0,0,.08);
   background-color: #17202c4b;
}

/* filter and blur end for nav */



/* ---- Nav ---- end ---*/
/* ================= UTIL ================= */
.primary {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}




/* ================= MOTION SETTINGS ================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ================= FADE-IN SECTIONS ================= */
.section {
  opacity: 0;
  transform: translateY(12px);
  animation: sectionReveal 0.7s cubic-bezier(.22,1,.36,1) forwards;
}

.section:nth-of-type(1) { animation-delay: 0.05s; }
.section:nth-of-type(2) { animation-delay: 0.12s; }
.section:nth-of-type(3) { animation-delay: 0.18s; }
.section:nth-of-type(4) { animation-delay: 0.25s; }

@keyframes sectionReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= CARD MICRO-HOVER ================= */
.card {
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
}

/* ================= TEXT SMOOTHNESS ================= */
.section-title,
.section-heading,
.tip-title {
  transition: color 0.25s ease;
}

/* ================= BUTTON / SELECT FEEDBACK ================= */
.lang-select,
.theme-toggle {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lang-select:focus,
.theme-toggle:active {
  transform: scale(0.96);
}

/* ================= TAP HIGHLIGHT ================= */
* {
  -webkit-tap-highlight-color: transparent;
}
