:root {
  --bg: #eef8f1;
  --body: #e8fbea;
  --card: #ffffff;
  --border: #e5e5ea;
  --text: #111111;
  --muted: #6e6e73;
  --green: #22c55e;
  --green-dark: #16a34a;
  --blue: #007aff;
  --red: #ff3b30;
  --soft-green: #dcfce7;
  --input-bg: #ffffff;
  --page-gradient:
    radial-gradient(circle at top left, #dcfce7 0, transparent 38%),
    linear-gradient(180deg, #e8fbea 0%, #f5fff7 45%, #e8fbea 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #03130a;
    --body: #03130a;
    --card: #1c1c1e;
    --border: #3a3a3c;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --green: #44d965;
    --green-dark: #2ba448;
    --blue: #4aa3ff;
    --red: #ff405c;
    --soft-green: #062411;
    --input-bg: #2c2c2e;
    --page-gradient:
      radial-gradient(circle at top left, #062411 0, transparent 40%),
      linear-gradient(180deg, #03130a 0%, #061b0d 45%, #03130a 100%);
  }
}

* {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
  height: auto;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  background: var(--page-gradient);
  color: var(--text);
}

.page {
  width: min(1050px, 92%);
  max-width: 100%;
  margin: 0 auto;
  padding: 36px 0 70px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
  padding: 34px 16px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.45);
}
.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0;
}

.pagination button {
  margin-top: 0;
  padding: 9px 13px;
}

.pagination .active-page {
  background: var(--blue);
  color: white;
}

@media (prefers-color-scheme: dark) {
  .hero {
    background: rgba(28, 28, 30, 0.72);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin: 18px 0 8px;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 auto;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.5;
}

.radar-circle {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border: 2px solid var(--green);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 28px rgba(53, 242, 155, 0.25);
  background: rgba(0, 0, 0, 0.12);
}

.radar-circle::before,
.radar-circle::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(53, 242, 155, 0.35);
  border-radius: 50%;
}

.radar-circle::before {
  inset: 30px;
}

.radar-circle::after {
  inset: 58px;
}

.radar-sweep {
  position: absolute;
  width: 50%;
  height: 50%;
  left: 50%;
  top: 0;
  background: linear-gradient(90deg, rgba(53, 242, 155, 0.55), transparent);
  transform-origin: bottom left;
  animation: spin 2.3s linear infinite;
}

.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red);
}

.dot-1 {
  left: 45px;
  top: 48px;
}

.dot-2 {
  right: 38px;
  top: 82px;
}

.dot-3 {
  left: 82px;
  bottom: 38px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-card,
.card,
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
}

select {
  appearance: auto;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  margin-top: 18px;
  background: var(--green);
  color: #02130b;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

.secondary-button {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 12px;
}

.section-header h2 {
  margin: 0;
}

#resultCount {
  color: var(--muted);
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-card h3 {
  margin: 0 0 8px;
}

.event-card p {
  margin: 4px 0;
  color: var(--muted);
}

.event-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.event-actions a,
.event-actions button {
  display: inline-block;
  margin: 0;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.event-actions a {
  background: var(--blue);
  color: white;
}

.saved-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.saved-links-title {
  margin: 0 0 8px !important;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.saved-link-actions {
  margin-top: 8px;
}

.event-actions a.provider-link {
  background: var(--blue);
  color: white;
}

.event-actions a.seatgeek-link {
  background: #f97316;
  color: white;
}

.empty {
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 18px;
}

.app-banner-container {
  margin: 24px 0 10px;
}

.apps-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

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

.apps-banner h2 {
  margin: 0;
  font-size: 1.35rem;
}

.apps-banner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.app-card {
  display: grid;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease;
}

.app-card:hover {
  transform: translateY(-2px);
}

.app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-card h3 {
  margin: 0;
  font-size: 1rem;
}

.app-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.app-card strong {
  color: var(--green);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .apps-banner-header {
    display: block;
  }

  .secondary-button {
    margin-top: 12px;
  }
}