/* ===== 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;
}

/* inline-block required so transforms work on logo letter spans */
.logo span { display: inline-block; }

.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 ===== */
.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); }

.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; }

/* ===== THE SET 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;
}

/* ===== LOOT DISPLAY (inside fence modal) ===== */
.loot-display {
  background: #e6f4ea;
  border: 1px solid #34A853;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 16px;
  color: #137333;
  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;
}

/* ===== SPLIT 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; }

/* ===== LOOT TICKER (persistent top bar) ===== */
.loot-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #e6f4ea;
  border-bottom: 2px solid #34A853;
  color: #137333;
  z-index: 999;
  font-family: arial, sans-serif;
  font-size: 13px;
  padding: 7px 16px;
}

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

.loot-ticker-label {
  font-weight: 700;
}

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

.loot-ticker-tag {
  background: #34A853;
  color: #fff;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

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

/* ===== STEALING MECHANIC ===== */
.stealable { cursor: grab !important; }

.stealable:not(.stolen):not(.stealing):not(.respawning):hover {
  opacity: 0.65;
  transition: opacity 0.1s;
}

@keyframes steal-swipe {
  0%   { transform: scale(1) rotate(0deg); opacity: 1; }
  25%  { transform: scale(1.2) rotate(-4deg); opacity: 1; }
  100% { transform: scale(0.1) translateX(55vw) rotate(22deg); opacity: 0; }
}

@keyframes respawn-in {
  0%   { transform: translateY(-18px) scale(0.65); opacity: 0; }
  65%  { transform: translateY(3px) scale(1.07); opacity: 0.9; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.stealable.stealing {
  animation: steal-swipe 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

.stealable.stolen {
  visibility: hidden;
  pointer-events: none;
}

.stealable.respawning {
  visibility: visible;
  animation: respawn-in 0.5s ease forwards;
}

/* ===== MONEY POPUP ===== */
@keyframes money-float {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  15%  { transform: translateY(-8px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-75px) scale(0.9); opacity: 0; }
}

.money-popup {
  position: fixed;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #137333;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  pointer-events: none;
  z-index: 2500;
  animation: money-float 1.1s ease forwards;
  white-space: nowrap;
}

/* ===== DRIVE-BY ===== */
.driveby-car {
  position: fixed;
  top: 42%;
  z-index: 1500;
  font-size: 54px;
  pointer-events: none;
  white-space: nowrap;
  left: -150px;
  line-height: 1;
}

@keyframes drive-across {
  0%   { left: -150px; }
  100% { left: calc(100vw + 150px); }
}

.driveby-car.active {
  animation: drive-across 2.2s linear forwards;
}

/* Bullet holes */
@keyframes hole-appear {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.bullet-hole {
  position: fixed;
  width: 13px;
  height: 13px;
  background: radial-gradient(circle, #1a1a1a 20%, #444 50%, #888 70%, transparent 85%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1499;
  animation: hole-appear 0.15s ease-out;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
}

.bullet-hole.fading {
  transition: opacity 1.5s ease;
  opacity: 0;
}

/* Cracks radiating from bullet holes */
.bullet-hole::before {
  content: '';
  position: absolute;
  inset: -6px;
  background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.04) 41%, transparent 42%),
              conic-gradient(from 0deg, transparent 30deg, rgba(0,0,0,0.06) 31deg, transparent 32deg, transparent 90deg, rgba(0,0,0,0.06) 91deg, transparent 92deg, transparent 150deg, rgba(0,0,0,0.06) 151deg, transparent 152deg, transparent 210deg, rgba(0,0,0,0.06) 211deg, transparent 212deg, transparent 270deg, rgba(0,0,0,0.06) 271deg, transparent 272deg);
  border-radius: 50%;
}

/* Screen shake */
@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  10%      { transform: translate(-4px, 2px); }
  20%      { transform: translate(3px, -3px); }
  30%      { transform: translate(-3px, 4px); }
  40%      { transform: translate(4px, -2px); }
  50%      { transform: translate(-2px, 3px); }
  60%      { transform: translate(3px, -4px); }
  70%      { transform: translate(-4px, 1px); }
  80%      { transform: translate(2px, 3px); }
  90%      { transform: translate(-1px, -2px); }
}

body.shaking {
  animation: screen-shake 0.45s ease;
}

/* ===== 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;
  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; }
