@import url(https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Nunito+Sans:wght@500;700;800&display=swap);

:root {
  --bg-0: #fff9f5;
  --bg-1: #fde7d9;
  --ink-1: #2f1a0f;
  --ink-2: #5f4638;
  --line: rgba(90, 52, 31, 0.2);
  --accent: #8a4d2f;
  --accent-strong: #6f3a21;
  --surface: rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito Sans', sans-serif;
  color: var(--ink-1);
  background: linear-gradient(140deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

.landing-root {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.landing-background::before,
.landing-background::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
}

.landing-background::before {
  width: 420px;
  height: 420px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle at center, rgba(170, 102, 66, 0.42) 0%, rgba(170, 102, 66, 0) 72%);
}

.landing-background::after {
  width: 380px;
  height: 380px;
  right: -100px;
  bottom: -140px;
  background: radial-gradient(circle at center, rgba(111, 58, 33, 0.32) 0%, rgba(111, 58, 33, 0) 72%);
}

.landing-content-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-card {
  width: min(560px, 100%);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(92, 53, 32, 0.16);
  padding: 18px;
}

.brand-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.brand-text {
  min-width: 0;
}

.brand-kicker {
  margin: 0 0 4px;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.12;
}

.hero-description {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}

.match-details-chip {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-strong);
  background: rgba(138, 77, 47, 0.12);
  border: 1px solid rgba(138, 77, 47, 0.24);
  width: fit-content;
  max-width: 100%;
}

.status-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-loader {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(138, 77, 47, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

.status-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.actions-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.action-button {
  width: 100%;
  border: 1px solid rgba(111, 58, 33, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 15px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(92, 53, 32, 0.12);
  border-color: rgba(111, 58, 33, 0.52);
}

.action-button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-color: transparent;
}

.footer-note {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.legal-link-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.legal-link-separator {
  color: rgba(95, 70, 56, 0.7);
  font-size: 12px;
}

.inline-link {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.legal-content-shell {
  align-items: flex-start;
  padding-top: 24px;
  padding-bottom: 32px;
}

.legal-card {
  width: min(860px, 100%);
}

.legal-title {
  font-size: clamp(24px, 5vw, 38px);
}

.legal-intro {
  margin-bottom: 10px;
}

.legal-last-updated {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.legal-pill {
  border-radius: 999px;
  border: 1px solid rgba(111, 58, 33, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
  text-decoration: none;
}

.legal-pill.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #fff;
}

.legal-sections {
  display: grid;
  gap: 18px;
}

.account-deletion-card {
  width: min(920px, 100%);
}

.account-deletion-byline {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.account-deletion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-deletion-panel {
  border: 1px solid rgba(111, 58, 33, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.account-deletion-panel-title {
  margin: 0 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  line-height: 1.2;
}

.account-deletion-paragraph {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.account-deletion-list {
  margin-top: 10px;
}

.account-deletion-form-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-deletion-label {
  margin: 4px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.account-deletion-input {
  width: 100%;
  border: 1px solid rgba(111, 58, 33, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-1);
  font: inherit;
  padding: 13px 14px;
}

.account-deletion-input:focus {
  outline: 2px solid rgba(138, 77, 47, 0.24);
  border-color: rgba(111, 58, 33, 0.42);
}

.account-deletion-button {
  margin-top: 2px;
}

.account-deletion-error {
  margin: 0;
  color: #9b2c2c;
  font-size: 13px;
  font-weight: 700;
}

.account-deletion-success {
  border: 1px solid rgba(111, 58, 33, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 22px;
}

.account-deletion-success-title {
  margin: 0 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  line-height: 1.15;
}

.account-deletion-success-links {
  margin-top: 16px;
}

.support-card {
  width: min(920px, 100%);
}

.support-grid {
  display: grid;
  gap: 16px;
}

.support-contact-card,
.support-info-panel {
  border: 1px solid rgba(111, 58, 33, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.support-info-panel {
  margin-top: 16px;
}

.support-contact-title {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-contact-action {
  margin-top: 6px;
  display: inline-flex;
  width: auto;
  max-width: 100%;
  text-decoration: none;
}

.support-footnote {
  margin: 16px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.legal-section {
  border-top: 1px solid rgba(111, 58, 33, 0.14);
  padding-top: 18px;
}

.legal-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.legal-section-title {
  margin: 0 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  line-height: 1.2;
}

.legal-paragraph,
.legal-list-item {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.legal-paragraph {
  margin: 0 0 10px;
}

.legal-list {
  margin: 0;
  padding-left: 20px;
}

.legal-list-item + .legal-list-item {
  margin-top: 8px;
}

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

@media (min-width: 680px) {
  .landing-card {
    padding: 26px;
  }

  .actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions-grid .primary {
    grid-column: 1 / -1;
  }

  .legal-content-shell {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Analytics page */
.analytics-auth-screen,
.analytics-dashboard-shell {
  min-height: 100vh;
  width: 100%;
}

.analytics-auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.analytics-auth-card {
  width: min(460px, 100%);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(92, 53, 32, 0.16);
  padding: 24px;
}

.analytics-auth-title,
.analytics-dashboard-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: var(--ink-1);
}

.analytics-auth-title {
  font-size: clamp(28px, 5vw, 36px);
}

.analytics-auth-subtitle,
.analytics-dashboard-subtitle {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.4;
}

.analytics-password-input {
  width: 100%;
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid rgba(111, 58, 33, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-1);
  font-size: 17px;
  font-weight: 700;
  padding: 12px 14px;
}

.analytics-auth-button,
.analytics-page-button,
.analytics-tab-button {
  border-radius: 12px;
  border: 1px solid rgba(111, 58, 33, 0.3);
  font-weight: 800;
  cursor: pointer;
}

.analytics-auth-button {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  font-size: 16px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.analytics-auth-error {
  margin: 12px 0 0;
  color: #b7182d;
  font-weight: 800;
  font-size: 14px;
}

.analytics-dashboard-shell {
  padding: 22px 16px 28px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.analytics-dashboard-header {
  margin-bottom: 14px;
}

.analytics-dashboard-title {
  font-size: clamp(28px, 4vw, 40px);
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analytics-metric-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(92, 53, 32, 0.08);
  padding: 12px;
}

.analytics-metric-title {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.analytics-metric-value {
  margin: 4px 0 0;
  color: var(--ink-1);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.analytics-charts-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.analytics-section-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(92, 53, 32, 0.1);
  padding: 14px;
}

.analytics-section-title {
  margin: 0;
  font-size: 20px;
  color: var(--ink-1);
}

.analytics-empty {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

.analytics-horizontal-bars {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.analytics-horizontal-bar-row {
  display: grid;
  gap: 6px;
}

.analytics-horizontal-label {
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 800;
}

.analytics-horizontal-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(138, 77, 47, 0.12);
  overflow: hidden;
}

.analytics-horizontal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a4d2f 0%, #c88153 100%);
}

.analytics-horizontal-fill.device {
  background: linear-gradient(90deg, #4656b5 0%, #7796ff 100%);
}

.analytics-timeline-chart {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8px, 1fr));
  gap: 4px;
  align-items: end;
  min-height: 120px;
}

.analytics-timeline-item {
  display: grid;
  gap: 4px;
  align-items: end;
}

.analytics-timeline-value {
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.analytics-timeline-bar {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #8a4d2f 0%, #6f3a21 100%);
}

.analytics-click-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.analytics-click-row {
  border-radius: 12px;
  border: 1px solid rgba(111, 58, 33, 0.2);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
}

.analytics-click-title {
  margin: 0;
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 800;
}

.analytics-click-subtitle {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.analytics-click-meta {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12px;
}

.analytics-pagination-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.analytics-page-button {
  padding: 8px 12px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.92);
}

.analytics-page-label {
  margin: 0;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.analytics-loading-message {
  margin: 12px 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}

.analytics-tab-row {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.analytics-tab-button {
  padding: 9px 8px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.9);
}

.analytics-tab-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

@media (min-width: 900px) {
  .analytics-dashboard-shell {
    padding: 28px 24px 36px;
  }

  .analytics-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .analytics-charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-charts-grid .analytics-section-card:last-child {
    grid-column: 1 / -1;
  }
}

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

  .account-deletion-success-title {
    font-size: 24px;
  }
}
