/* ===== Responsive Adaptation ===== */

/* Desktop: scale up everything for readability */
@media (min-width: 1024px) {
  .container { max-width: 960px; }

  /* Larger base text */
  body { font-size: 1.05rem; }

  /* Bigger buttons */
  .btn, .btn-primary, .btn-outline, button, .btn-submit, .btn-lottery, .btn-draw, .shake-btn, .pray-btn, .btn-light, .btn-qi {
    font-size: 1.05rem !important;
    padding: 0.8rem 2rem !important;
    min-height: 3rem;
  }

  /* Bigger cards */
  .card { padding: 1.5rem; }
  .card-title { font-size: 1.35rem; }
  .card-desc { font-size: 1rem; }
  .card-grid { gap: 1.25rem; }

  /* Bigger hero */
  .hero-title, .hero h1 { font-size: 4rem !important; }
  .hero-subtitle, .hero p { font-size: 1.15rem !important; }
  .section-title, .why-title { font-size: 2.5rem !important; }

  /* Bigger inputs */
  input, textarea, select { font-size: 1rem !important; padding: 0.75rem 1rem !important; }

  /* Bigger section spacing */
  .section { padding-bottom: 5rem; }
  .page-title, .ph-title, .dream-title, .almanac-title, .more-title { font-size: 2.5rem !important; }
  .page-sub, .ph-sub, .dream-sub, .almanac-sub, .more-sub { font-size: 1rem !important; }

  /* Bigger bottom bar */
  .bottom-bar { padding: 1rem 1.5rem !important; }
  .bottom-bar .price-amount, .bottom-price { font-size: 2rem !important; }

  /* Bigger nav */
  .desktop-nav .nav-link { font-size: 0.95rem !important; gap: 1.5rem; }
  .logo-text { font-size: 1.6rem !important; }
}

/* Tablet: 768-1024px */
@media (min-width: 768px) {
  .bottom-nav { display: none !important; }
  .main { padding-bottom: 2rem; }
}

/* ===== Desktop Nav ===== */
.desktop-nav { display: none; align-items: center; gap: 1rem; }
@media (min-width: 768px) { .desktop-nav { display: flex; } }
.desktop-nav .nav-link {
  font-size: 0.8rem; color: rgba(245,240,232,0.6); text-decoration: none;
  transition: color 0.15s; white-space: nowrap;
}
.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.active { color: #c9a05c; }

/* ===== Bottom Nav (Mobile Tabbar) ===== */
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 100;
  border-top: 1px solid rgba(201,160,94,0.12);
  background: rgba(16,12,10,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.bottom-nav-inner {
  display: grid; grid-template-columns: repeat(6, 1fr);
  width: 100%;
  padding: 0.4rem 0.2rem;
  padding-bottom: max(env(safe-area-inset-bottom), 0.4rem);
  min-height: 56px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; padding: 0.15rem 0; min-height: 48px;
  text-decoration: none; color: rgba(139,125,109,0.5);
  font-size: 0.55rem; border-radius: 0.5rem;
  transition: all 0.2s; position: relative;
}
.nav-item.active { color: #c9a05c; }
.nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1.5rem; height: 2px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, #c9a05c, transparent);
}
.nav-item svg { width: 1.3rem; height: 1.3rem; }
.nav-item span { line-height: 1.2; letter-spacing: 0.02em; }

@media (min-width: 768px) { .bottom-nav { display: none; } }

/* ===== Homepage Mobile Specific ===== */
@media (max-width: 768px) {
  .hero { min-height: calc(100svh - 3.5rem); gap: 1rem; }
  .hero-logo-ring { width: 4.5rem; height: 4.5rem; }
  .hero-logo-ring svg { width: 2.6rem; height: 2.6rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 0.85rem; max-width: 22rem; line-height: 1.8; }
  .hero-buttons { gap: 0.6rem; }
  .card-grid { gap: 0.65rem; }
  .card { padding: 0.9rem; }
  .card-title { font-size: 1.125rem; }
  .card-desc { font-size: 0.8rem; }
  .section-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
  .why-grid { gap: 0.65rem; }
  .panel-bordered { padding: 1.25rem 1rem; }
  .panel-title { font-size: 1.25rem; }
  .panel-desc { font-size: 0.85rem; }
  .section { padding-bottom: 2rem; }

  /* Share FAB position */
  .share-fab { right: 0.75rem; bottom: 5rem; width: 2.5rem; height: 2.5rem; }
}

/* ===== Layout ===== */
.main { position: relative; z-index: 10; min-height: 100vh; width: 100%; padding-top: 3.5rem; }

@media (max-width: 480px) {
  .container { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  .header-inner { padding: 0 0.75rem; }
  .logo-text { font-size: 1.1rem; }
  .logo-svg { width: 1.8rem; height: 1.8rem; }
  .music-btn { width: 2rem; height: 2rem; }
  .music-btn svg { width: 1.1rem; height: 1.1rem; }
  .scroll-indicator { font-size: 0.75rem; }
  .footer { padding-top: 1.5rem; font-size: 0.75rem; }
}

/* ===== Grid Helpers ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ===== Touch-friendly ===== */
@media (max-width: 768px) {
  button, a, .clickable { cursor: default; }
  input, textarea, select { font-size: 16px !important; }
}
