:root {
  --bg: #0b0e14;
  --surface: #121722;
  --surface-elevated: #171c28;
  --surface-hover: #1e2433;

  --accent: #5eead4;        /* Soft teal */
  --accent-muted: #134e4a;  /* Deep teal */
  --accent-glow: rgba(94, 234, 212, 0.25);

  --text-main: #e5e7eb;
  --text-dim: #9ca3af;
  --text-muted: #6b7280;

  --border: #232838;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0b0e14 0%, #0e1220 100%);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

/* Header & Nav */
.site-header {
  background: rgba(18, 23, 34, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Main Card */
main.card {
  width: 100%;
  max-width: 820px;
  margin: 3rem auto;
  padding: 2.75rem;
  background: radial-gradient(
      1200px 300px at top,
      rgba(94, 234, 212, 0.04),
      transparent
    ),
    var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p.lead {
  margin: 0 0 2.25rem 0;
  font-size: 1rem;
  color: var(--text-dim);
}

/* Caption Selection */
.caption-type-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2.75rem;
}

.caption-option {
  cursor: pointer;
}

.caption-option input[type="radio"] {
  display: none;
}

.caption-option .square {
  height: 110px;
  background: linear-gradient(
    180deg,
    var(--surface-elevated),
    var(--bg)
  );
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    color 0.2s ease;
}

.caption-option .caption-label {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Checked state */
.caption-option input[type="radio"]:checked + .square {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow:
    0 10px 30px -10px var(--accent-glow),
    inset 0 0 0 1px rgba(94, 234, 212, 0.15);
  transform: translateY(-3px);
}

.caption-option input[type="radio"]:checked ~ .caption-label {
  color: var(--accent);
  font-weight: 600;
}

/* Labels */
label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Inputs */
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15);
}

.row {
  display: flex;
  gap: 1rem;
}

.half {
  flex: 1;
}

/* Buttons */
button {
  width: 100%;
  padding: 0.9rem 1.4rem;
  background: linear-gradient(
    180deg,
    #7df3df,
    var(--accent)
  );
  color: #022c22;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    0 10px 25px -10px var(--accent-glow);
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

button:hover {
  opacity: 0.95;
  box-shadow:
    0 14px 30px -12px var(--accent-glow);
}

button:active {
  transform: scale(0.97);
}

/* Result Box */
.result {
  background: linear-gradient(
    180deg,
    var(--surface-elevated),
    var(--bg)
  );
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-main);
}

.small {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 600px) {
  main.card {
    margin: 1rem;
    padding: 1.75rem;
  }

  .caption-type-selection {
    grid-template-columns: 1fr;
  }

  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}