.chat-window {
  position: fixed;
  bottom: 20px;
  right: 20px;

  width: 320px;
  height: 420px;

  background: rgba(20, 20, 20, 0.92);
  border: 3px solid #b08d3b;
  border-radius: 6px;

  display: flex;
  flex-direction: column;

  font-family: "Cinzel", serif;
  color: #e6d7a5;

  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.chat-header {
  padding: 10px;
  background: linear-gradient(#3a2f1a, #2a2214);
  border-bottom: 2px solid #b08d3b;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-weight: bold;
  font-size: 1.1rem;
}

.recipient-select {
  background: #2a2214;
  color: #e6d7a5;
  border: 1px solid #b08d3b;
  padding: 4px;
  border-radius: 4px;
}

.chat-log {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: url("/textures/parchment.jpg");
  background-size: cover;
  color: #FFD700;
  font-family: "IM Fell English", serif;
}

.chat-input {
  display: flex;
  border-top: 2px solid #b08d3b;
}

.chat-input input {
  flex: 1;
  padding: 8px;
  background: #f5e6c8;
  border: none;
  font-family: "IM Fell English", serif;
}

.chat-input button {
  background: #b08d3b;
  border: none;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  color: #2a2214;
}

.chat-input button:hover {
  background: #d4b45a;
}
:root {
  color-scheme: dark;
  --bg: #1d1a13;
  --panel: #2f2a21;
  --panel-strong: #3f362b;
  --border: #9f8a65;
  --text: #f2e7c8;
  --muted: #cabf95;
  --accent: #d4b36e;
  --accent-2: #f4e7b0;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: url('/static/Obsidian_(texture)_JE1_BE1.png') repeat;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
}

.aoe-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(74, 57, 34, 0.95), rgba(31, 25, 16, 0.92));
  border: 2px solid rgba(255, 238, 193, 0.18);
  border-radius: 24px 24px 18px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 238, 193, 0.08), var(--shadow);
}

.aoe-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-crest {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(212, 179, 110, 0.9);
  border-radius: 12px;
  background: radial-gradient(circle at 35% 35%, rgba(212, 179, 110, 0.9), rgba(71, 53, 31, 0.24));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.aoe-brand h1 {
  margin: 0;
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aoe-brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.aoe-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.aoe-nav-bar a {
  padding: 12px 20px;
  border-radius: 0;
  border: 2px solid #d4b36e;
  background: linear-gradient(180deg, #9c1212 0%, #5a0000 100%);
  color: #f9e5b8;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.aoe-nav-bar a:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #b01a1a 0%, #7a0000 100%);
  box-shadow: 0 0 0 4px rgba(212, 179, 110, 0.12);
}

.aoe-main-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 2fr) minmax(280px, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.aoe-panel {
  background: rgba(21, 18, 12, 0.92);
  border: 2px solid rgba(212, 179, 110, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.aoe-panel-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 22px;
}

.aoe-panel-block h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.player-list li {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.session-card {
  padding: 24px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(212, 179, 110, 0.12), rgba(54, 47, 31, 0.48));
  border: 1px solid rgba(212, 179, 110, 0.16);
}

.session-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-card strong {
  display: block;
  font-size: 3rem;
}

.aoe-welcome-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(212, 179, 110, 0.14), rgba(20, 17, 12, 0.78));
  border: 1px solid rgba(212, 179, 110, 0.14);
}

.aoe-welcome-card p {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.aoe-welcome-card h2 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 3rem);
}

.aoe-cta-button,
.aoe-send-button {
  border: 2px solid #c69d40;
  padding: 16px 24px;
  border-radius: 0;
  background: linear-gradient(180deg, #8c0f0f, #3c0000);
  color: #f7e3b2;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.aoe-cta-button:hover,
.aoe-send-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #a41919, #500000);
}

.aoe-search-card {
  margin-bottom: 24px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.aoe-search-card label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.aoe-search-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.aoe-search-inner input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
}

.aoe-search-inner button {
  border: 2px solid #c69d40;
  padding: 14px 18px;
  border-radius: 0;
  background: linear-gradient(180deg, #8c0f0f, #3c0000);
  color: #f7e3b2;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.aoe-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.aoe-section-header h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.aoe-section-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.aoe-quest-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.aoe-quest-card {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.aoe-quest-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.aoe-quest-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.aoe-quest-card span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(212, 179, 110, 0.12);
  color: var(--accent-2);
  font-size: 0.85rem;
}

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

.dice-button {
  border: 2px solid #c69d40;
  background: linear-gradient(180deg, #8c0f0f, #330000);
  color: #f7e3b2;
  padding: 14px 0;
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.aoe-roll-display {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.aoe-roll-display span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#roll-result {
  min-height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(212, 179, 110, 0.1);
  font-size: 2.4rem;
  font-weight: 800;
}

.message-panel textarea {
  width: 100%;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  margin-bottom: 14px;
  resize: vertical;
}



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

  .aoe-search-inner {
    grid-template-columns: 1fr;
  }
}
