:root {
  color-scheme: dark;
  --red: #e51b23;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 18px 12px;
  color: #fff;
  background: radial-gradient(ellipse at top, #292020, #090909 65%);
  font: 16px/1.45 Arial, sans-serif;
}

.site-header, .panel {
  border: 1px solid #4a1719;
  border-radius: 14px;
  background: #101010;
  overflow: hidden;
}

.site-header {
  max-width: 1200px;
  margin: 0 auto 18px;
  text-align: center;
  padding: 20px 12px;
  background: linear-gradient(135deg, #160909, #242424);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(27px, 4vw, 44px);
}

.site-header span,
.panel-title span {
  color: var(--red);
}

.site-header p {
  color: #ccc;
  font-size: 12px;
  letter-spacing: 3px;
}

/* TIP BUTTON */
.tip-section {
  text-align: center;
  padding: 18px 10px;
  margin: 0 auto 18px;
  max-width: 1200px;
  background: #101010;
  border: 1px solid #4a1719;
  border-radius: 14px;
}

.tip-button {
  display: inline-block;
  padding: 14px 28px;
  background: #e51b23;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  border: 1px solid #ff5555;
  transition: background 0.2s ease;
}

.tip-button:hover {
  background: #a80e15;
}

.tip-section p {
  color: #ccc;
  font-size: 13px;
  margin: 10px 0 0;
}

.layout {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  box-shadow: 0 12px 35px #0008;
}

.panel-title {
  margin: 0;
  padding: 15px 10px;
  text-align: center;
  background: #201414;
  border-bottom: 1px solid #4a1719;
  font-size: 20px;
}

.radio-player {
  padding: 12px;
}

.radio-player iframe {
  display: block;
  width: 100%;
  height: 330px;
  border: 0;
}

.caption {
  text-align: center;
  color: #aaa;
  padding: 0 10px 14px;
  font-size: 12px;
}

.bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #1c1c1c;
  font-size: 13px;
  border-bottom: 1px solid #383838;
}

#status {
  flex: 1;
  color: #ddd;
}

.dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #888;
}

.dot.online {
  background: #48d17a;
}

#messages {
  height: 420px;
  min-height: 260px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty {
  margin: auto;
  color: #aaa;
  text-align: center;
}

.msg {
  padding: 10px;
  background: #1d1d1d;
  border: 1px solid #333;
  border-left: 3px solid var(--red);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.msghead {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.name {
  color: #ff5258;
  font-weight: bold;
}

.time {
  color: #888;
  font-size: 11px;
}

.msgtext {
  white-space: pre-wrap;
}

.controls {
  padding: 14px;
  background: #181818;
  border-top: 1px solid #383838;
}

label {
  display: block;
  color: #bbb;
  font-size: 12px;
  margin-bottom: 5px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

input, textarea {
  width: 100%;
  padding: 11px;
  background: #0c0c0c;
  color: white;
  border: 1px solid #444;
  border-radius: 7px;
  font: inherit;
}

textarea {
  min-height: 70px;
  resize: vertical;
}

.sendrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

button {
  padding: 11px 18px;
  color: white;
  font-weight: bold;
  border: 0;
  border-radius: 7px;
  background: #d71920;
  cursor: pointer;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

#hint {
  color: #aaa;
  font-size: 12px;
}

footer {
  text-align: center;
  color: #888;
  font-size: 11px;
  padding: 15px;
}

@media(max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }

  body {
    padding: 10px 7px;
  }
}

/* Language switch (FR | EN) */
.lang {
  display: inline-flex;
  gap: 2px;
}

.lang button {
  padding: 3px 7px;
  font-size: 11px;
  font-weight: bold;
  color: #aaa;
  background: transparent;
  border: 1px solid #444;
  border-radius: 5px;
}

.lang button[aria-pressed="true"] {
  color: #fff;
  background: #d71920;
  border-color: #d71920;
}

/* "I'm human" check: takes no space unless Cloudflare needs a click */
.turnstile:not(:empty) {
  margin-top: 10px;
}
