:root {
  --bg: #101418;
  --panel: #171d23;
  --panel-soft: #202832;
  --text: #eef2f5;
  --muted: #9aa8b5;
  --accent: #f2b84b;
  --accent-dark: #8c5f13;
  --danger: #e05252;
  --ok: #5fc47b;
  --border: #2b3541;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #26313c 0, var(--bg) 42%);
  color: var(--text);
  min-height: 100vh;
}

header {
  padding: 28px clamp(18px, 4vw, 48px) 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(16,20,24,.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.server-pill {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  color: var(--muted);
}

.server-pill strong { color: var(--ok); }

.server-pill strong.offline { color: var(--danger); }

.server-pill-extra {
  color: var(--muted);
}

main {
  padding: 28px clamp(18px, 4vw, 48px) 48px;
  display: grid;
  grid-template-columns: minmax(280px, 40%) minmax(260px, 60%);
  gap: 24px;
}

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

  .actions {
    grid-template-columns: 1fr;
  }

  .server-control-form .input-row {
    flex-direction: column;
  }
}

.card {
  background: rgba(23,29,35,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card-header h2 {
  margin: 0;
  font-size: 18px;
}

.card-header span {
  color: var(--muted);
  font-size: 13px;
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.95);
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 118px;
  text-align: center;
}

.mode-badge.live {
  background: rgba(95, 196, 123, 0.14);
  border-color: rgba(95, 196, 123, 0.35);
  color: var(--ok);
}

.mode-badge.preview,
.mode-badge.warning {
  background: rgba(224, 82, 82, 0.14);
  border-color: rgba(224, 82, 82, 0.35);
  color: var(--danger);
}

.card-body { padding: 18px 20px 20px; }

.diagnostics-panel {
  grid-column: 1 / -1;
}

.diagnostics-actions,
.available-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diagnostics-content.collapsed,
.available-content.collapsed,
.select-content.collapsed,
.library-content.collapsed {
  display: none;
}

.diagnostics-section {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.diagnostics-section:last-child {
  margin-bottom: 0;
}

.diagnostics-subheader {
  padding: 0;
  border: none;
  background: transparent;
}

.diagnostics-subheader h3 {
  margin: 0;
  font-size: 15px;
}

.diagnostics-subheader span {
  color: var(--muted);
  font-size: 12px;
}

.diagnostics-section .console {
  min-height: 160px;
  max-height: 260px;
  overflow: auto;
}

.readiness-legend {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.readiness-legend summary {
  cursor: pointer;
  width: fit-content;
}

.readiness-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px 14px 0 0;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.verified {
  background: rgba(62, 207, 142, 0.72);
}

.legend-dot.uncertain {
  background: rgba(242, 184, 75, 0.82);
}

.legend-rcon {
  color: rgba(242, 184, 75, 0.92);
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 999px;
  padding: 1px 4px;
  font-size: 9px;
  font-style: normal;
  line-height: 1.2;
}

.search {
  width: 100%;
  background: #0d1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  outline: none;
}

.available-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.filter-chip {
  padding: 6px 10px;
  min-height: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #10161c;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.filter-chip span {
  color: inherit;
}

.filter-chip.active,
.filter-chip[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent-dark);
  background: rgba(95, 211, 154, 0.14);
}

.map-list {
  max-height: 520px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.map-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 14px;
  background: #11171d;
  border: 1px solid transparent;
}

.map-row:hover { border-color: var(--accent-dark); }

.map-row-left {
  display: grid;
  gap: 6px;
}

.map-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.favorite-button {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.favorite-button:hover,
.favorite-button:focus-visible {
  color: var(--accent);
  border-color: rgba(242, 184, 75, 0.28);
  background: rgba(242, 184, 75, 0.08);
}

.favorite-button.active {
  color: var(--accent);
}

.map-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.map-badge-builtin,
.map-badge-standard {
  color: #e8c47a;
  background: rgba(242, 184, 75, 0.14);
}

.map-badge-workshop {
  color: #6ec2ff;
  background: rgba(110, 194, 255, 0.15);
}

.map-badge-manual {
  color: #c5c1ad;
  background: rgba(179, 176, 162, 0.14);
}

.map-meta {
  display: grid;
  gap: 4px;
}

.map-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.map-tag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.map-tag-badges:empty { display: none; }

.map-tag-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(110, 194, 255, 0.11);
  color: #a9d8f5;
  font-size: 11px;
  line-height: 1.3;
}

.map-tag-editor summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.map-tag-editor summary::-webkit-details-marker { display: none; }

.map-tag-options {
  min-width: 130px;
  margin-top: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1b242c;
}

.map-tag-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.map-tag-options input { margin: 0; accent-color: var(--accent); }

#mapList .map-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.selectable-map-heading,
.selectable-map-bottom {
  display: flex;
  align-items: center;
  min-width: 0;
}

.selectable-map-heading {
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.selectable-map-heading .map-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selectable-map-heading .map-tag-badge { flex: 0 0 auto; }

#mapList .selectable-map-bottom .map-meta { display: none; }

.selectable-map-bottom {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
}

.selectable-map-bottom .map-actions {
  flex-wrap: nowrap;
  gap: 6px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  #mapList .map-row { flex-wrap: wrap; }
  .selectable-map-heading { flex-basis: 100%; }
  .selectable-map-heading .map-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.map-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.source-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(242, 184, 75, 0.18);
  color: var(--accent);
  font-size: 11px;
  vertical-align: middle;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  color: #151515;
  background: var(--accent);
  position: relative;
}

button.secondary {
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

button.readiness-verified-api::after,
button.readiness-uncertain::after,
button.readiness-legacy-rcon::after {
  position: absolute;
  top: 4px;
  right: 5px;
  pointer-events: none;
}

button.readiness-verified-api::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(62, 207, 142, 0.72);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.16);
}

button.readiness-uncertain {
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.18);
}

button.readiness-uncertain::after {
  content: '?';
  color: rgba(242, 184, 75, 0.88);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

button.readiness-legacy-rcon {
  border-style: dashed;
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.14);
  padding-right: 34px;
}

button.readiness-legacy-rcon::after {
  content: 'RCON';
  color: rgba(242, 184, 75, 0.92);
  background: rgba(14, 22, 32, 0.82);
  border: 1px solid rgba(242, 184, 75, 0.22);
  border-radius: 999px;
  padding: 1px 4px;
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0;
}

button.secondary.paused {
  background: rgba(242, 184, 75, 0.14);
  color: var(--accent);
  border-color: rgba(242, 184, 75, 0.35);
}

button.secondary.paused small {
  color: rgba(242, 184, 75, 0.9);
}

button:disabled,
button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--panel-soft);
  color: var(--muted);
}

.button-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.server-control-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.preset-announcements {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

button.compact-preset {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-row input {
  flex: 1 1 220px;
}

.player-section {
  margin-top: 18px;
}

.status-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.status-note.warning {
  color: var(--danger);
}

.player-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.player-item {
  padding: 12px;
  border-radius: 12px;
  background: #0e1620;
  border: 1px solid var(--border);
  display: grid;
  gap: 4px;
}

.player-item strong {
  display: block;
}

.map-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.map-note-unavailable {
  color: #ffb3b3;
}

button.danger {
  background: var(--danger);
  color: white;
}

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
}

button:active { transform: translateY(1px); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.compact-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

body.compact-mode header {
  padding: 20px clamp(18px, 4vw, 36px) 12px;
}

body.compact-mode .server-pill {
  padding: 8px 12px;
}

body.compact-mode main {
  gap: 18px;
}

body.compact-mode .layout-left,
body.compact-mode .layout-right {
  gap: 18px;
}

body.compact-mode .card-header {
  padding: 14px 16px;
}

body.compact-mode .card-body {
  padding: 14px 16px 16px;
}

body.compact-mode .search,
body.compact-mode input[type="number"],
body.compact-mode .login-form input,
body.compact-mode .input-row input {
  padding: 10px 12px;
}

body.compact-mode .available-filter-buttons {
  gap: 6px;
  margin-bottom: 8px;
}

body.compact-mode .filter-chip {
  padding: 5px 8px;
  font-size: 11px;
}

body.compact-mode .map-list,
body.compact-mode .cycle-list,
body.compact-mode .player-list,
body.compact-mode .actions,
body.compact-mode .button-group,
body.compact-mode .server-control-form {
  gap: 8px;
}

body.compact-mode .map-row {
  padding: 10px 12px;
}

body.compact-mode .cycle-item {
  padding: 8px 10px;
}

body.compact-mode .drag-handle,
body.compact-mode .icon-button {
  width: 28px;
  height: 28px;
}

body.compact-mode .favorite-button {
  width: 22px;
  height: 22px;
  font-size: 16px;
}

body.compact-mode .map-row-left {
  gap: 4px;
}

body.compact-mode .map-title-row {
  gap: 6px;
}

body.compact-mode .map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

body.compact-mode .map-note {
  margin-top: 0;
  white-space: nowrap;
}

body.compact-mode .map-actions button,
body.compact-mode .button-group button,
body.compact-mode .input-row button,
body.compact-mode button {
  padding: 8px 12px;
}

body.compact-mode .action-button {
  min-height: 52px;
  padding: 12px 14px;
}

body.compact-mode .metric {
  padding: 10px;
}

body.compact-mode .card {
  border-radius: 16px;
}

body.compact-mode .empty {
  padding: 14px;
}

body.compact-mode .source-pill,
body.compact-mode .mode-badge,
body.compact-mode .map-badge {
  font-size: 11px;
  padding: 2px 8px;
}

body.compact-mode button.readiness-legacy-rcon::after {
  font-size: 7px;
  padding: 1px 3px;
}

body.compact-mode button.readiness-legacy-rcon {
  padding-right: 30px;
}

body.compact-mode .readiness-legend {
  font-size: 11px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px clamp(18px, 4vw, 48px);
}

.login-card {
  width: min(100%, 420px);
}

.login-description {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.login-form input {
  width: 100%;
  background: #0d1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

.login-form button {
  width: 100%;
}

.input-error {
  min-height: 22px;
  color: var(--danger);
  font-size: 14px;
}

.layout-left,
.layout-right {
  display: grid;
  gap: 24px;
  align-content: start;
}

.current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  background: #11171d;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.metric label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 19px;
}

.cycle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}

.cycle-item {
  display: grid;
  grid-template-columns: 24px 30px 18px 24px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #11171d;
  border: 1px solid var(--border);
  position: relative;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.cycle-item[draggable="true"] {
  cursor: grab;
}

.cycle-item.cycle-dragging {
  opacity: 0.48;
  border-color: rgba(242, 184, 75, 0.7);
  box-shadow: 0 0 0 1px rgba(242, 184, 75, 0.25);
}

.cycle-item.cycle-played {
  border-color: rgba(62, 207, 142, 0.22);
  background: rgba(62, 207, 142, 0.045);
}

.cycle-item.cycle-current {
  border-color: rgba(242, 184, 75, 0.52);
  box-shadow: inset 3px 0 0 rgba(242, 184, 75, 0.72);
}

.cycle-item.cycle-drop-before::before,
.cycle-item.cycle-drop-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.14);
}

.cycle-item.cycle-drop-before::before {
  top: -7px;
}

.cycle-item.cycle-drop-after::after {
  bottom: -7px;
}

.cycle-item .nr {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cycle-progress-icon {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.cycle-played .cycle-progress-icon {
  color: var(--ok);
}

.cycle-current .cycle-progress-icon {
  color: var(--accent);
}

.cycle-map-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.cycle-map-heading .map-tag-badge { flex: 0 0 auto; }

.cycle-item .map-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cycle-played .map-name {
  color: rgba(226, 232, 240, 0.72);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(62, 207, 142, 0.55);
}

.cycle-current .map-name {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.drag-handle,
.icon-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
}

.drag-handle {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  cursor: grab;
  font-size: 16px;
}

.drag-handle:hover,
.drag-handle:focus-visible {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel-soft);
}

.cycle-move-actions {
  display: flex;
  gap: 4px;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.action-button {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.action-button small {
  opacity: .7;
  font-weight: 500;
}

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

.sudden-death-settings label {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

input[type="number"] {
  width: 100%;
  background: #0d1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.input-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.input-error.visible {
  opacity: 1;
}

.input-error.success {
  color: var(--ok);
}

.bot-control-section .button-group {
  flex-wrap: wrap;
}

.team-handicap-control {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.team-handicap-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.team-handicap-header label {
  color: var(--text);
}

.team-handicap-header span {
  text-align: right;
}

.team-handicap-buttons button.active {
  background: rgba(62, 207, 142, 0.16);
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.36);
}

.team-handicap-fallback[hidden] {
  display: none;
}

.bot-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.bot-control-grid .control-row {
  margin-top: 0;
}

.bot-control-static {
  align-items: end;
  margin-top: 4px;
}

.control-row-button {
  align-self: end;
}

.control-row-button button {
  width: 100%;
}

.console {
  background: #080b0e;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #d8f3dc;
  white-space: pre-wrap;
  overflow: auto;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.library-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

select,
input[type="text"] {
  width: 100%;
  background: #0d1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.command-preview {
  background: #080b0e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #d8f3dc;
  min-height: 44px;
  overflow: auto;
}

.announcement-input-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  pointer-events: none;
}

.announcement-input-wrapper.visible {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 14px;
}

.announcement-input-wrapper input[type="text"] {
  width: 100%;
  background: #0d1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.announcement-input-wrapper input[type="text"]:focus {
  border-color: var(--accent);
}

.announcement-input-wrapper input[type="text"]::placeholder {
  color: var(--muted);
}

button.sudden-death {
  background: linear-gradient(135deg, var(--danger) 0%, #c93c3c 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

button.sudden-death::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
}

button.sudden-death:hover::before {
  left: 100%;
}

button.sudden-death:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
  header { align-items: flex-start; flex-direction: column; }
  main { grid-template-columns: 1fr; }
  .current-grid,
  .actions,
  .bot-control-grid,
  .form-grid { grid-template-columns: 1fr; }
}
