:root {
  --text: #f2f7ff;
  --muted: #9bb0c7;
  --max: 480px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Rajdhani", sans-serif;
  color: var(--text);
  background: #020814;
  overflow-x: hidden;
}

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #020814;
}

.hero {
  position: relative;
  width: 100%;
  line-height: 0;
  animation: heroIn 0.9s ease-out both;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.actions {
  flex: 1;
  padding: 0 5% 20px;
  margin-top: -47%;
  position: relative;
  z-index: 3;
  animation: riseIn 0.8s 0.2s ease-out both;
}

/* Keep search.png natural pill shape (transparent corners) */
.search-wrap {
  position: relative;
  width: 92%;
  margin: 0 auto;
  background: transparent;
  line-height: 0;
  filter: drop-shadow(0 0 12px rgba(0, 232, 255, 0.28));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.search-wrap:focus-within {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 18px rgba(0, 232, 255, 0.45));
}

.search-wrap .search-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.search-wrap input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent !important;
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0 22px;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}

.search-wrap input::placeholder {
  color: rgba(200, 230, 255, 0.72);
}

.start-btn {
  display: block;
  width: 88%;
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  filter: drop-shadow(0 8px 18px rgba(200, 20, 30, 0.35));
  animation: btnPulse 1.8s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.start-btn:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 10px 22px rgba(200, 20, 30, 0.5));
}

.start-btn:active {
  transform: scale(0.98);
  animation: none;
}

.start-btn img {
  width: 100%;
  height: auto;
  display: block;
}

.footer {
  margin-top: auto;
  padding: 4px 20px 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  animation: riseIn 0.8s 0.35s ease-out both;
}

.errorbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
}

.errorbox.show { display: flex; }

.error-content {
  max-width: 320px;
  padding: 18px 22px;
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.92);
  border: 1px solid rgba(255, 77, 77, 0.45);
  color: #fff;
  font-size: clamp(20px, 5.2vw, 24px);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: popIn 0.25s ease-out;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@media (min-width: 720px) {
  :root { --max: 520px; }
  .actions { margin-top: -47%; }
}
