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

body {
  font-family: arial, sans-serif;
  background: #fff;
  color: #202124;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #70757a; text-decoration: none; font-size: 14px; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-links a {
  font-size: 13px;
  color: #202124;
}

.grid-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grid-btn:hover { background: #f1f3f4; }

.grid-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: radial-gradient(circle, #5f6368 2px, transparent 2px);
  background-size: 7px 7px;
}

.signin-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 23px;
  font-size: 14px;
  font-family: arial, sans-serif;
  cursor: pointer;
  font-weight: 500;
}
.signin-btn:hover { background: #1765cc; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* ===== MAIN ===== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(60px, 20vh, 160px);
}

/* ===== PARODY DISCLAIMER ===== */
.parody-disclaimer {
  font-size: 11px;
  color: #9aa0a6;
  margin-bottom: 16px;
  text-align: center;
}

/* ===== LOGO ===== */
.logo {
  font-family: Poppins, sans-serif;
  font-size: 92px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 28px;
  user-select: none;
  letter-spacing: -2px;
}

.blue   { color: #4285F4; }
.red    { color: #EA4335; }
.yellow { color: #FBBC05; }
.green  { color: #34A853; }

/* ===== SEARCH BAR ===== */
.search-wrapper { width: 100%; max-width: 584px; padding: 0 16px; }

.search-bar {
  display: flex;
  align-items: center;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0 14px;
  height: 44px;
  gap: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.search-bar:hover,
.search-bar:focus-within {
  box-shadow: 0 1px 6px rgba(32,33,36,0.28);
  border-color: transparent;
}

.search-icon { flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: arial, sans-serif;
  color: #202124;
  background: transparent;
}

.search-right-icons { display: flex; align-items: center; gap: 8px; }

/* ===== BUTTONS ===== */
.buttons {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.search-btn, .lucky-btn {
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  font-family: arial, sans-serif;
  font-size: 14px;
  height: 36px;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}
.search-btn:hover, .lucky-btn:hover {
  border-color: #dadce0;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ===== LANGUAGE LINE ===== */
.language-line {
  margin-top: 26px;
  font-size: 13px;
  color: #202124;
}
.language-line a { color: #1a0dab; font-size: 13px; margin-left: 4px; }
.language-line a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
footer {
  background: #f2f2f2;
  border-top: 1px solid #dadce0;
  width: 100%;
}

.footer-top {
  padding: 14px 24px;
  border-bottom: 1px solid #dadce0;
  font-size: 15px;
  color: #70757a;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
}

.footer-left, .footer-right {
  display: flex;
  gap: 20px;
}

.footer-left a, .footer-right a {
  font-size: 14px;
  color: #70757a;
}
.footer-left a:hover, .footer-right a:hover { text-decoration: underline; }

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fade-in 0.25s ease;
}

.overlay.hidden { display: none; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== MODAL (charity) ===== */
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 40px 44px;
  max-width: 480px;
  width: 90%;
  position: relative;
  text-align: center;
  animation: slide-up 0.25s ease;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #70757a;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.modal-close:hover { background: #f1f3f4; color: #202124; }

.modal-star {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.modal h2 {
  font-family: Poppins, sans-serif;
  font-size: 22px;
  color: #202124;
  margin-bottom: 14px;
}

.modal p {
  font-size: 15px;
  color: #5f6368;
  line-height: 1.6;
  margin-bottom: 22px;
}

.charity-btn {
  display: inline-block;
  background: #1a73e8;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  font-family: arial, sans-serif;
  transition: background 0.15s, box-shadow 0.15s;
}
.charity-btn:hover { background: #1765cc; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.charity-btn.small { padding: 8px 20px; font-size: 14px; margin-top: 8px; }

.modal-sub {
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 10px;
  margin-bottom: 0;
}

.modal-dismiss-btn {
  display: block;
  margin: 20px auto 0;
  background: none;
  border: none;
  color: #9aa0a6;
  font-size: 13px;
  cursor: pointer;
  font-family: arial, sans-serif;
}
.modal-dismiss-btn:hover { text-decoration: underline; color: #5f6368; }

/* ===== PAYWALL MODAL ===== */
.paywall-modal {
  max-width: 760px;
  padding: 36px 40px 28px;
}

.paywall-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.paywall-logo {
  font-family: Poppins, sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.paywall-badge {
  background: #fbbc05;
  color: #202124;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  align-self: center;
}

.paywall-title {
  font-family: Poppins, sans-serif;
  font-size: 20px;
  color: #202124;
  margin-bottom: 8px;
}

.paywall-sub {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 16px;
}

/* ===== DEBT COUNTER ===== */
.debt-counter {
  background: #fce8e6;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 16px;
  color: #c5221f;
  font-weight: 500;
  margin-bottom: 22px;
  display: inline-block;
}

/* ===== PLANS ===== */
.plans {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  text-align: left;
}

.plan {
  flex: 1 1 220px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 18px 16px;
  position: relative;
}

.plan-featured {
  border-color: #1a73e8;
  border-width: 2px;
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a73e8;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.plan-name {
  font-size: 13px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 6px;
}

.plan-price {
  font-size: 22px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 10px;
  font-family: Poppins, sans-serif;
}
.plan-price span {
  font-size: 13px;
  font-weight: 400;
  color: #70757a;
}

.plan-features {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.8;
  white-space: pre-line;
}

/* ===== SUBSCRIBE BUTTON ===== */
.subscribe-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 40px;
  font-size: 15px;
  font-family: arial, sans-serif;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
  transition: background 0.15s;
}
.subscribe-btn:hover { background: #1765cc; }

.subscribe-joke {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #5f6368;
  line-height: 1.6;
}
.subscribe-joke p { margin-bottom: 6px; }

/* ===== DISMISS LINK ===== */
.no-thanks-wrapper { text-align: center; margin-top: 6px; }

.no-thanks {
  font-size: 10px;
  color: #dadce0;
  text-decoration: none;
}
.no-thanks:hover { color: #9aa0a6; text-decoration: underline; }

/* ===== DEBT TICKER (persistent top bar) ===== */
.debt-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #b31412;
  color: #fff;
  z-index: 999;
  font-family: arial, sans-serif;
  font-size: 13px;
  padding: 7px 16px;
}

.debt-ticker-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.debt-ticker-label {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.debt-ticker-amount {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  flex-shrink: 0;
}

.debt-ticker-apr {
  background: #fff;
  color: #b31412;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.debt-ticker-interest-label {
  color: rgba(255,255,255,0.75);
  margin-left: 6px;
}

.debt-ticker-interest {
  font-variant-numeric: tabular-nums;
  color: #ffcdd2;
  min-width: 60px;
  flex-shrink: 0;
}

body.has-debt {
  padding-top: 34px;
}

/* ===== RESULTS PAGE ===== */
.results-page {
  min-height: 100vh;
  background: #fff;
  font-family: arial, sans-serif;
}

.results-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid #efefef;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.results-logo {
  font-family: Poppins, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  text-decoration: none;
  flex-shrink: 0;
}

.results-search-bar {
  display: flex;
  align-items: center;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0 14px;
  height: 40px;
  gap: 10px;
  flex: 1;
  max-width: 580px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.results-search-bar:focus-within {
  box-shadow: 0 1px 6px rgba(32,33,36,0.28);
  border-color: transparent;
}
.results-search-bar .search-input { font-size: 15px; }

.results-search-btn {
  flex-shrink: 0;
}

.results-tabs {
  display: flex;
  gap: 0;
  padding: 0 170px;
  border-bottom: 1px solid #efefef;
}

.results-tab {
  padding: 12px 16px;
  font-size: 13px;
  color: #70757a;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.results-tab.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}
.results-tab:hover { color: #202124; }

.results-body {
  max-width: 652px;
  padding: 16px 24px 40px;
  margin-left: 170px;
}

.results-stats {
  font-size: 13px;
  color: #70757a;
  margin-bottom: 4px;
}

.results-did-you-mean {
  font-size: 15px;
  color: #202124;
  margin-bottom: 16px;
}
.results-did-you-mean a {
  color: #1a0dab;
  font-style: italic;
  font-size: 15px;
}

/* Sponsored result */
.result-sponsored {
  border: 1px solid #fce8e6;
  background: #fff8f7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.result-sponsored-label {
  font-size: 11px;
  color: #70757a;
  margin-bottom: 4px;
}

/* Regular result */
.result {
  margin-bottom: 28px;
}

.result-url {
  font-size: 13px;
  color: #202124;
  margin-bottom: 2px;
}
.result-url span {
  color: #70757a;
  font-size: 12px;
}

.result-title {
  font-size: 20px;
  color: #1a0dab;
  cursor: pointer;
  line-height: 1.3;
  margin-bottom: 4px;
}
.result-title:hover { text-decoration: underline; }

.result-snippet {
  font-size: 14px;
  color: #4d5156;
  line-height: 1.58;
}
.result-snippet strong { color: #202124; }

.result-end {
  font-size: 14px;
  color: #70757a;
  text-align: center;
  padding: 24px 0 0;
  border-top: 1px solid #efefef;
}

/* Knowledge panel */
.knowledge-panel {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: #3c4043;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* People Also Ask */
.paa-box {
  border: 1px solid #dadce0;
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}

.paa-title {
  font-size: 17px;
  font-weight: 400;
  color: #202124;
  padding: 14px 16px 10px;
}

.paa-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #efefef;
  cursor: pointer;
  flex-wrap: wrap;
  gap: 4px;
}
.paa-item:hover { background: #f8f9fa; }

.paa-q {
  font-size: 14px;
  color: #202124;
  flex: 1;
}

.paa-chevron {
  font-size: 12px;
  color: #70757a;
  margin-left: 8px;
  flex-shrink: 0;
}

.paa-answer {
  width: 100%;
  font-size: 14px;
  color: #4d5156;
  line-height: 1.58;
  padding-top: 8px;
  border-top: 1px solid #efefef;
  margin-top: 8px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #202124;
  color: #fff;
  font-family: arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 460px;
  width: max-content;
  text-align: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== HIDDEN ===== */
.hidden { display: none !important; }
