/* Multiplayer Lobby & Shot-Clock Overlays (Sunlit Atlantean Parchment & Bronze) */

.lobby-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(34, 26, 16, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lobby-overlay.hidden {
  display: none;
}

.lobby-card {
  width: 100%;
  max-width: 660px;
  background: linear-gradient(180deg, #f2e9d5, #e0d3b6);
  border: 2px solid #8a642c;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(24, 16, 8, 0.55);
  overflow: hidden;
}

.lobby-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border);
  background: linear-gradient(90deg, rgba(168, 126, 58, 0.2), rgba(42, 127, 115, 0.14));
}

.lobby-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #543712;
}

.lobby-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.lobby-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 16px 20px;
}

.lobby-col {
  display: flex;
  flex-direction: column;
}

.text-input {
  width: 100%;
  padding: 7px 9px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: #fbf6ea;
  color: var(--ink);
  font-size: 13px;
}

.text-input:focus {
  outline: none;
  border-color: var(--patina);
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 185px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(255, 250, 238, 0.55);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.room-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #f5eedb;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.empty-rooms {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  padding: 18px 8px;
}

.lobby-error {
  padding: 4px 20px 12px;
  color: #9e261a;
  font-size: 12px;
  font-weight: 600;
  min-height: 18px;
}

.lobby-chat-section {
  padding: 0 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-log {
  height: 118px;
  overflow-y: auto;
  padding: 6px 8px;
  background: rgba(255, 250, 238, 0.72);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-msg {
  line-height: 1.35;
  word-break: break-word;
}

.chat-msg .chat-author {
  font-weight: 700;
  color: #543712;
}

.chat-msg.rival .chat-author {
  color: #9e3124;
}

.chat-msg.self .chat-author {
  color: #0e635d;
}

.chat-msg .chat-time {
  font-family: Consolas, monospace;
  font-size: 9.5px;
  color: var(--muted);
  margin-right: 4px;
}

.chat-input-row {
  display: flex;
  gap: 6px;
}

.solarium-btn {
  background: linear-gradient(180deg, #e5c375, #b88b3a);
  border-color: #6b4914;
  color: #2b1d09;
  font-weight: 700;
  padding: 8px 13px;
  white-space: nowrap;
}

.solarium-btn:hover {
  background: linear-gradient(180deg, #f0d084, #c99a44);
}

.campaign-btn {
  background: linear-gradient(180deg, #27a89f, #167670);
  border-color: #0d4d49;
  color: #f7f2e4;
  font-weight: 700;
  padding: 8px 13px;
  white-space: nowrap;
}

.campaign-btn:hover {
  background: linear-gradient(180deg, #32bfb5, #1b8c85);
}

.editor-btn {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-color: #4c1d95;
  color: #f8f5ff;
  font-weight: 700;
  padding: 8px 13px;
  white-space: nowrap;
}

.editor-btn:hover {
  background: linear-gradient(180deg, #9d74f8, #7c3aed);
}

.linear-run-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  margin-bottom: 12px;
  background: rgba(255, 250, 238, 0.85);
  border: 1.5px solid #9c7a42;
  border-radius: 7px;
}

.linear-track {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.track-node {
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1.5px solid #9c7a42;
  background: #f4ecda;
  color: #543712;
  cursor: pointer;
}

.track-node.done {
  background: #d9f2e6;
  border-color: #108568;
  color: #095944;
}

.track-node.current {
  background: #0e8f86;
  border-color: #08544f;
  color: #fff;
}

.track-node.locked {
  opacity: 0.48;
  cursor: not-allowed;
}

.track-arrow {
  color: #9c7a42;
  font-size: 10px;
  font-weight: 700;
}

.camp-seq-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  margin: 2px 0;
}

.camp-seq-pip {
  font-family: Consolas, monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9px;
  border: 1px solid rgba(114, 84, 44, 0.4);
  background: rgba(255, 250, 238, 0.7);
  color: var(--muted);
}

.camp-seq-pip.done {
  background: rgba(16, 185, 129, 0.18);
  border-color: #108568;
  color: #065f46;
}

.camp-seq-pip.active {
  background: #0e8f86;
  border-color: #08544f;
  color: #fff;
}

.ed-level-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 126px;
  overflow-y: auto;
  padding: 3px;
  background: rgba(255, 250, 238, 0.55);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.ed-level-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.ed-level-btn {
  flex: 1;
  text-align: left;
  padding: 3px 6px;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-level-btn.active {
  background: rgba(14, 143, 134, 0.22);
  border-color: #0e8f86;
  color: #0b5752;
  font-weight: 700;
}

.ed-move-btn {
  padding: 2px 5px;
  font-size: 9.5px;
}

.campaign-card {
  max-width: 820px;
}

.campaign-body {
  padding: 16px 20px 20px;
  max-height: 74vh;
  overflow-y: auto;
}

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

.trial-card {
  background: linear-gradient(180deg, #faf3e3, #ebe0c6);
  border: 1.5px solid #9c7a42;
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.trial-card.unlocked:hover {
  transform: translateY(-2px);
  border-color: #0e8f86;
  box-shadow: 0 6px 16px rgba(42, 30, 16, 0.18);
}

.trial-card.completed {
  border-color: #108568;
  background: linear-gradient(180deg, #f2faf6, #dfeee6);
}

.trial-card.locked {
  opacity: 0.56;
  filter: grayscale(0.35);
}

.trial-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.trial-roman {
  font-family: Georgia, serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #543712;
}

.trial-enemy {
  font-size: 11.5px;
  font-weight: 700;
  color: #8f2d21;
}

.trial-meta {
  font-family: Consolas, monospace;
  font-size: 10px;
  color: #0e635d;
  font-weight: 700;
}

.trial-brief {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.38;
  flex: 1;
}

.trial-unlock-note {
  font-size: 10px;
  color: #6b4914;
  background: rgba(184, 139, 58, 0.16);
  border-radius: 4px;
  padding: 3px 6px;
  font-weight: 600;
}

@media (max-width: 780px) {
  .campaign-grid {
    grid-template-columns: 1fr;
  }
}

.saved-spell-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.saved-spell-row .theorem-card {
  flex: 1;
  padding: 5px 8px;
}

.saved-spell-del {
  padding: 0 7px;
  font-weight: 700;
}

.room-box {
  background: rgba(255, 249, 236, 0.65);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clock-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.clock-sub.urgent {
  color: #b83022;
  font-weight: 700;
}

.arena-banner {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  text-align: center;
  padding: 10px 18px;
  background: rgba(244, 236, 218, 0.94);
  border: 1.5px solid #8a642c;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(42, 30, 16, 0.28);
  max-width: 420px;
}

.banner-title {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: #543712;
}

.banner-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 980px) {
  .lobby-body {
    grid-template-columns: 1fr;
  }
}
