/* pttradio.co.uk AI Radio Partner Site - Modern dark radio theme */

:root {
  --bg: #0b0f14;
  --bg-card: #141a22;
  --bg-hover: #1c2430;
  --accent: #00c853;
  --accent-dim: #00a844;
  --accent-blue: #2196f3;
  --accent-orange: #ff9800;
  --text: #e8eef5;
  --text-muted: #8b9bb0;
  --border: #2a3544;
  --danger: #ff5252;
  --success: #00c853;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #00e676;
}

/* Header */
header {
  background: linear-gradient(180deg, #0f1520 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
nav a {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
nav a:hover, nav a.active {
  background: var(--bg-hover);
  color: var(--accent);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.card .btn {
  align-self: flex-start;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #003d1a;
}
.btn-primary:hover {
  background: #00e676;
  color: #003d1a;
}
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #253040;
  border-color: var(--accent-dim);
}
.btn-blue {
  background: var(--accent-blue);
  color: white;
}
.btn-blue:hover {
  background: #42a5f5;
}
.btn-orange {
  background: var(--accent-orange);
  color: #1a1000;
}
.btn-orange:hover {
  background: #ffb74d;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* AI Partner specific */
.ai-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  min-height: 70vh;
}
@media (max-width: 900px) {
  .ai-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.panel h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.mode-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.mode-btns .btn {
  width: 100%;
  justify-content: center;
}

/* Chat area */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
}
.chat-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.chat-status .live {
  color: var(--accent);
  font-weight: 600;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
  max-height: 480px;
}

.msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  position: relative;
}
.msg.user {
  align-self: flex-end;
  background: #1a3a2a;
  border: 1px solid #2a5a40;
  border-bottom-right-radius: 4px;
}
.msg.ai {
  align-self: flex-start;
  background: #1a2433;
  border: 1px solid #2a3a50;
  border-bottom-left-radius: 4px;
}
.msg .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-family: var(--mono);
}
.msg .content {
  white-space: pre-wrap;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.chat-input-area input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}
.chat-input-area input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Style badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-cb { background: #3d2b00; color: #ffb74d; }
.badge-ssb { background: #0d2b3a; color: #4fc3f7; }
.badge-ham { background: #1a2e1a; color: #81c784; }

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utility */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none !important; }

/* First contact steps */
.steps {
  counter-reset: step;
  list-style: none;
}
.steps li {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.3rem;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: #003d1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Net room simulation */
.net-users {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.user-pill {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
}
.user-pill.talking {
  border-color: var(--accent);
  background: #0d2a1a;
  color: var(--accent);
}

/* Map placeholder */
.map-placeholder {
  background: #0d1218;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-muted);
  gap: 0.5rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    width: 100%;
  }
}
/* =========================
   AI Radio Pro / handheld look
   ========================= */

.compact-hero {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.ai-pro-page {
  max-width: 1400px;
}

.radio-shell {
  margin-top: 1rem;
}

.radio-frame {
  position: relative;
  background: linear-gradient(180deg, #2b3038 0%, #141920 100%);
  border: 1px solid #3a414d;
  border-radius: 28px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}

.radio-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.6rem 0.8rem;
}

.radio-brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #d6dce5;
  font-size: 0.92rem;
}

.radio-mini-lights { display: flex; gap: 0.45rem; }
.light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,255,255,0.15);
}
.light.green { background: #00d25d; }
.light.amber { background: #f8ad1c; }
.light.red { background: #d94242; }

.radio-main-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}

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

.radio-left-panel,
.radio-right-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.14));
  border: 1px solid #414958;
  border-radius: 22px;
  padding: 1rem;
}

.radio-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.radio-grille span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b0f14 0%, #1d2430 100%);
  border: 1px solid #090d12;
}

.radio-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.radio-knob-wrap label {
  display: block;
  color: #aeb9c8;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.radio-knob-wrap input,
.radio-knob-wrap select,
.typed-input-row textarea {
  width: 100%;
  background: #091018;
  border: 1px solid #354152;
  color: #eaf3ff;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
}

.radio-switches {
  display: grid;
  gap: 0.5rem;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #141c26;
  border: 1px solid #2f3947;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.radio-meta-note {
  font-size: 0.85rem;
  color: #b8c2d1;
  background: #131922;
  border: 1px solid #313b49;
  border-radius: 12px;
  padding: 0.8rem;
}

.radio-display-wrap {
  margin-bottom: 1rem;
}

.radio-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.display-title {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #9aa7b8;
  font-weight: 800;
}

.display-sub {
  font-size: 0.9rem;
  color: #dbe8f6;
}

.radio-signal-meter {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 20px;
}
.radio-signal-meter span {
  width: 6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #8bf07b, #3cbf44);
}
.radio-signal-meter span:nth-child(1){ height: 6px; }
.radio-signal-meter span:nth-child(2){ height: 9px; }
.radio-signal-meter span:nth-child(3){ height: 12px; }
.radio-signal-meter span:nth-child(4){ height: 16px; }
.radio-signal-meter span:nth-child(5){ height: 19px; }

.lcd-screen {
  border-radius: 18px;
  background: linear-gradient(180deg, #c7ef93 0%, #94c56d 100%);
  color: #15200d;
  padding: 0.95rem 1rem;
  border: 3px solid #49543e;
  box-shadow: inset 0 2px 8px rgba(30,50,20,0.2);
  font-family: var(--mono);
}

.lcd-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.lcd-row + .lcd-row { margin-top: 0.45rem; }
.lcd-row.freq {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lcd-row.small {
  font-size: 0.82rem;
}
.status-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.14);
}
.status-pill.idle { background: rgba(0,0,0,0.12); }
.status-pill.tx { background: rgba(185, 58, 58, 0.22); }
.status-pill.rx { background: rgba(56, 123, 64, 0.25); }
.status-pill.error { background: rgba(160, 60, 10, 0.25); }

.transcript-panel {
  background: #0a1017;
  border: 1px solid #313b49;
  border-radius: 16px;
  padding: 0.85rem;
}

.radio-messages {
  min-height: 320px;
  max-height: 420px;
}

.typed-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (max-width: 700px) {
  .typed-input-row { grid-template-columns: 1fr; }
}

.radio-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.ptt-panel {
  margin-top: 1rem;
  background: linear-gradient(180deg, #161d28 0%, #0f141c 100%);
  border: 1px solid #2d3949;
  border-radius: 22px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ptt-side-label {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: #8fa2b8;
  font-weight: 800;
}

.ptt-big {
  width: min(100%, 420px);
  min-height: 120px;
  border-radius: 28px;
  border: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: radial-gradient(circle at 30% 20%, #ff8a8a 0%, #d32f2f 34%, #8f1818 100%);
  box-shadow: inset 0 4px 18px rgba(255,255,255,0.18), 0 10px 24px rgba(0,0,0,0.4);
  padding: 1.1rem;
}
.ptt-big:hover { transform: translateY(-1px); }
.ptt-big:active { transform: translateY(1px) scale(0.995); }

.ptt-status {
  text-align: center;
  color: #c7d4e4;
  font-size: 0.94rem;
  min-height: 1.5em;
}

.chat-status-inline {
  font-weight: 700;
}
