
/* =========================
   1. RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Google Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* =========================
   2. COLOR SYSTEM
   Light mode default (Google-style)
========================= */
:root {
  /* Light */
  --bg: #ffffff;
  --surface: #f8f9fa;
  --elevated: #ffffff;
  --surface-hover: #f1f3f4;

  --text: #202124;
  --text-secondary: #3c4043;
  --muted: #5f6368;

  --border: #dadce0;
  --border-hover: #bdc1c6;

  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-surface: #e8f0fe;

  --radius: 24px;
  --radius-sm: 8px;
  --radius-md: 12px;

  --speed: 200ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-soft: 0 1px 6px rgba(32,33,36,0.28);
  --shadow-card: 0 1px 3px rgba(32,33,36,0.12);
  --shadow-focus: 0 0 0 3px rgba(26,115,232,0.2);

  color-scheme: light;
}

/* Dark mode — Google style (#202124 base) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202124;
    --surface: #303134;
    --elevated: #3c4043;
    --surface-hover: #3c4043;

    --text: #e8eaed;
    --text-secondary: #bdc1c6;
    --muted: #9aa0a6;

    --border: #5f6368;
    --border-hover: #9aa0a6;

    --primary: #8ab4f8;
    --primary-hover: #aecbfa;
    --primary-surface: #1e3a5f;

    --shadow-soft: 0 1px 6px rgba(0,0,0,0.5);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-focus: 0 0 0 3px rgba(138,180,248,0.25);

    color-scheme: dark;
  }
}

/* =========================
   3. LAYOUT
========================= */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.container {
  width: 100%;
  max-width: 720px;
}

/* =========================
   4. NAVBAR
========================= */
.navbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

/* =========================
   5. TITLE
========================= */
.title {
  font-size: 24px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

@media (min-width: 600px) {
  .title {
    font-size: 30px;
  }
}

/* =========================
   6. SEARCH BOX (Google-style)
========================= */
.search-wrapper {
  position: relative;
}

.search-box {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}

.search-box:hover {
  box-shadow: 0 2px 8px rgba(32,33,36,0.3);
  border-color: var(--border-hover);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.search-input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  caret-color: var(--primary);
}

.search-input::placeholder {
  color: var(--muted);
}

/* =========================
   7. SEARCH BUTTON
========================= */
.search-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

.search-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.search-btn:active {
  transform: scale(0.97);
}

/* =========================
   8. SUGGESTIONS DROPDOWN
========================= */
.suggestions {
  position: absolute;
  width: 100%;
  top: calc(100% + 4px);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: none;
  z-index: 10;
  box-shadow: var(--shadow-soft);
}

.suggestion-item {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--speed) var(--ease);
}

.suggestion-item::before {
  content: "🔍";
  font-size: 12px;
  opacity: 0.5;
  flex-shrink: 0;
}

.suggestion-item:hover {
  background: var(--surface-hover);
}

/* =========================
   9. CHIPS
========================= */
.chips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              color var(--speed) var(--ease);
}

.chip:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================
   10. TRUST TEXT
========================= */
.trust {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* =========================
   11. SECTION
========================= */
.section {
  margin-top: 44px;
  text-align: center;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* =========================
   12. GRID + CARDS
========================= */
.grid {
  display: grid;
  gap: 10px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: background var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              color var(--speed) var(--ease);
}

.card:hover {
  background: var(--elevated);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
  color: var(--text);
}

/* =========================
   13. FORM SYSTEM
========================= */
.form-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 0;
}

.form-group {
  margin-bottom: 12px;
}

.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.input::placeholder {
  color: var(--muted);
}

/* Select arrow */
select.input {
  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='%235f6368' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Readonly input (query prefill) */
.input[readonly] {
  background: var(--surface);
  color: var(--muted);
  cursor: default;
  font-size: 14px;
}

/* =========================
   14. PRIMARY BUTTON
========================= */
.btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}

.btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(26,115,232,0.35);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =========================
   15. TRENDING (search page)
========================= */
.trending {
  margin-top: 36px;
}

.trend-item {
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--speed) var(--ease);
}

.trend-item::before {
  content: "↗";
  color: var(--muted);
  font-size: 13px;
}

.trend-item:hover {
  color: var(--primary);
}

.trend-item:hover::before {
  color: var(--primary);
}

/* =========================
   16. FADE-IN ANIMATION
========================= */
.fade-in {
  animation: fadeIn 0.3s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   17. SCROLLBAR
========================= */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

/* =========================
   18. THANK YOU PAGE
========================= */
.steps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 20px;
  text-align: left;
}

.steps-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.step-num {
  background: var(--primary-surface);
  color: var(--primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* =========================
   19. RESPONSIVE
========================= */
@media (max-width: 480px) {
  .title {
    font-size: 20px;
  }
  .center {
    padding: 20px 16px;
  }
}
