@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gold: #d4af37;
  --gold-2: #f6dc8a;
  --gold-3: #9a7a1f;
  --ruby: #b3123a;
  --emerald: #0f5a41;
  --bg: #050706;
  --panel: rgba(14, 18, 17, 0.82);
  --panel-solid: #101614;
  --line: rgba(212, 175, 55, 0.28);
  --text: #f1ead6;
  --muted: #a49d88;
  --ok: #3ccf8e;
  --warn: #f0b429;
  --bad: #ff5470;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-2); }
h1, h2, h3, .serif { font-family: 'Cinzel', Georgia, serif; letter-spacing: 0.04em; }

.gold-text {
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-2) 30%, var(--gold) 60%, var(--gold-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn { text-decoration: none; display: inline-block; text-align: center;
  appearance: none; border: 1px solid var(--line); cursor: pointer;
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font: 600 14px 'Inter', sans-serif;
  transition: transform .12s, box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold {
  border: 1px solid #f3d77a;
  background: linear-gradient(180deg, #f8e08e 0%, #d4af37 45%, #a8841f 100%);
  color: #1b1404; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold:hover { background: linear-gradient(180deg, #ffe9a3 0%, #e0bb45 45%, #b58f25 100%); box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-red { border-color: #ff6b86; background: linear-gradient(180deg, #d42a52, #8d0f2c); color: #fff; }
.btn-green { border-color: #57e3a3; background: linear-gradient(180deg, #1f9d6a, #0c5c3d); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }

.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text); font: 500 15px 'Inter', sans-serif; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }

.glass {
  background: linear-gradient(180deg, rgba(20, 26, 24, 0.86), rgba(8, 11, 10, 0.9));
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

.msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(255, 84, 112, 0.12); border: 1px solid rgba(255, 84, 112, 0.4); color: #ffb3c0; }
.msg.ok { background: rgba(60, 207, 142, 0.12); border: 1px solid rgba(60, 207, 142, 0.4); color: #a9f0cf; }

/* toasts */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 12px 16px; border-radius: 12px; min-width: 220px; max-width: 360px;
  background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: toastIn .3s ease-out; font-size: 14px;
}
.toast.err { border-color: rgba(255, 84, 112, .6); }
.toast.ok { border-color: rgba(60, 207, 142, .6); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: none; align-items: center; justify-content: center; z-index: 900; padding: 16px; }
.modal-back.show { display: flex; }
.modal { width: 100%; max-width: 440px; padding: 24px; }
.modal h3 { margin: 0 0 16px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.full-bg {
  position: fixed; inset: 0; z-index: -1;
  background: url('/img/bg-lobby.png') center / cover no-repeat;
}
.full-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(5,7,6,.55) 0%, rgba(5,7,6,.88) 70%, rgba(5,7,6,.97) 100%);
}
.btn[hidden] { display: none; }
