:root {
  --bg: #0f1419;
  --surface: #1c2128;
  --surface-hover: #252c35;
  --border: #2d353f;
  --border-hover: #3d454f;
  --border-active: #0d9488;
  --text: #f0f3f6;
  --text-muted: #8b949e;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-glow: rgba(13, 148, 136, 0.15);
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 20px 40px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}
.header .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-gradient);
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.header .icon svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
.header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text);
}
.header p {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 400;
}
.header a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}
.header a:hover {
  color: var(--text);
}

/* Airline selector */
.airline-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.airline-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
}
.airline-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}
.airline-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}
.airline-btn .dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  flex-shrink: 0;
}

/* Airline brand colors */
.dot-delta { background: #003366; }
.dot-united { background: #002244; }
.dot-american { background: #b61f23; }
.dot-southwest { background: #c8102e; }
.dot-alaska { background: #01426a; }
.dot-jetblue { background: #003876; }

/* Mode tabs */
.mode-tabs {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.mode-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
}
.mode-tab:hover {
  color: var(--text);
}
.mode-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.card p:last-child {
  margin-bottom: 0;
}

/* Input group */
.input-group {
  margin-bottom: 20px;
}
.input-group:last-child { margin-bottom: 0; }
.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}
.input-wrapper:hover {
  border-color: var(--border-hover);
}
.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  font-family: 'DM Sans', sans-serif;
  min-width: 0;
}
.input-wrapper input::placeholder {
  color: #4a5568;
}
.input-suffix {
  padding-right: 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Result display */
.result-group {
  text-align: center;
  padding: 20px 16px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 148, 136, 0.3);
}
.result-value {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 4px;
}
.result-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Redemption mode: two results side by side */
.result-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.result-row .result-group {
  padding: 16px 12px;
}
.result-row .result-value {
  font-size: 24px;
}

/* Valuations table */
.valuations-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.valuations-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.val-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.val-item {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}
.val-item:hover {
  border-color: var(--border-hover);
}
.val-item.highlight {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.val-name {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.val-cents {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.val-cents span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Disclaimer */
.disclaimer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0 12px;
  margin-bottom: 20px;
}
.disclaimer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.disclaimer a:hover {
  color: var(--accent-light);
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--accent-light);
}

/* Selection */
::selection {
  background: rgba(13, 148, 136, 0.3);
  color: var(--text);
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 32px 16px 28px;
  }
  .airline-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .airline-btn {
    padding: 10px 4px 8px;
    font-size: 10px;
  }
  .airline-btn .dot {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }
  .val-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-value {
    font-size: 30px;
  }
  .result-row .result-value {
    font-size: 22px;
  }
  .header h1 {
    font-size: 24px;
  }
  .card {
    padding: 20px;
  }
  .mode-tab {
    font-size: 12px;
    padding: 8px 6px;
  }
}
