:root {
  --bg: #0f1217;
  --panel: #1a2029;
  --panel-2: #252e3b;
  --text: #e6edf6;
  --muted: #a8b4c7;
  --accent: #3bb273;
  --warn: #f2a93b;
  --danger: #de5b5b;
  --border: #324053;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #1b2430 0%, var(--bg) 45%);
}

a {
  color: #86d7ff;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.title {
  font-size: 1.25rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.card {
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.member {
  grid-template-columns: 1.8fr 1.2fr;
}

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

.lane-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.lane.card {
  padding: 0.7rem;
}

.video-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.messages {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.2);
}

.message {
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.message.message-sponsored {
  background: linear-gradient(
    90deg,
    rgba(215, 164, 79, 0.16),
    rgba(215, 164, 79, 0.04)
  );
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.2rem;
}

.message:last-child {
  border-bottom: none;
}

.message-head {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chat-form,
.stack {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.stack {
  flex-direction: column;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #11161d;
  color: var(--text);
  padding: 0.6rem;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6rem 0.9rem;
  color: #fff;
  cursor: pointer;
  background: #2c8c5d;
}

button.secondary {
  background: #3e5878;
}

button.warn {
  background: #9f7026;
}

button.danger {
  background: #9d3a3a;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.link-button {
  display: inline-block;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6rem 0.9rem;
  color: #fff;
  cursor: pointer;
  background: #2c8c5d;
  text-decoration: none;
}

.link-button.secondary {
  background: #3e5878;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  text-transform: uppercase;
}

.status-requested {
  background: rgba(59, 178, 115, 0.2);
  color: #98e3ba;
}

.status-waiting {
  background: rgba(242, 169, 59, 0.2);
  color: #ffcc7a;
}

.status-approved {
  background: rgba(93, 143, 240, 0.2);
  color: #9ec2ff;
}

.status-denied {
  background: rgba(222, 91, 91, 0.2);
  color: #ffb0b0;
}

.status-ended {
  background: rgba(159, 112, 38, 0.2);
  color: #ffd295;
}

.request-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.request-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.18);
}

.request-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.tier-pill {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  color: #d8dfeb;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.tier-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem;
  background: rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 0.25rem;
}

.tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tier-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--tier-color, #7f8ea3);
  font-weight: 700;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.admit-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.admit-mode label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.join-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.join-mode label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.small {
  font-size: 0.82rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .grid.member,
  .grid.host {
    grid-template-columns: 1fr;
  }

  .lane-board {
    grid-template-columns: 1fr;
  }

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

  .inline-fields {
    grid-template-columns: 1fr;
  }

  iframe {
    height: 280px;
  }
}
