/* === ОБЩИЕ ПЕРЕМЕННЫЕ === */
:root {
  --gold: #d4a957;
  --gold-bright: #e8c885;
  --gold-dim: #8a6e3a;
  --bg-dark: #0c0807;
  --brick-dark: #181210;
  --brick-mid: #251c17;
  --text-cream: #e6d4a8;
  --text-dim: #8a7553;
  --green: #5acd6f;
  --blue: #5a8ed4;
  --red: #c8503a;
  --hp-red: #c44a3a;
  --hp-green: #5acd6f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cormorant Garamond', serif;
  color: var(--text-cream);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-dark);
}

/* === ФОН ГЛАВНОГО МЕНЮ === */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}
.scene::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: url('../img/menu_bg.png') center / cover no-repeat;
  animation: bgDrift 30s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  0%   { transform: scale(1.0) translate(0%, 0%); }
  50%  { transform: scale(1.06) translate(1.5%, -1%); }
  100% { transform: scale(1.04) translate(-1%, 1.5%); }
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(160, 80, 220, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 60%, rgba(220, 80, 160, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
}

/* === ЧАСТИЦЫ === */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.particle {
  position: absolute;
  background: #ffd0f0;
  border-radius: 50%;
  opacity: 0;
  filter: blur(0.5px);
  box-shadow: 0 0 6px rgba(220, 130, 200, 0.6), 0 0 12px rgba(160, 100, 230, 0.4);
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(120vh) translateX(40px); }
}

/* === SIGN IN / VERSION === */
.signin {
  position: fixed; top: 24px; right: 28px;
  font-family: 'Cinzel', serif;
  font-size: 13px; letter-spacing: 0.18em;
  color: #d8b8ff;
  border: 1px solid rgba(200, 140, 255, 0.4);
  background: linear-gradient(180deg, rgba(40, 24, 60, 0.7), rgba(20, 12, 30, 0.7));
  padding: 10px 18px; cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease; z-index: 10;
}
.signin:hover {
  color: #fff;
  border-color: #ff5fa8;
  box-shadow: 0 0 18px rgba(255, 95, 168, 0.25);
}

.version {
  position: fixed; bottom: 16px; right: 24px;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.3em;
  color: rgba(200, 140, 255, 0.45); z-index: 5;
}

/* === ЭКРАНЫ === */
.screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px 80px;
  animation: fadeIn 0.6s ease;
}
.screen-full {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  animation: fadeIn 0.6s ease;
  z-index: 50;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

/* === ОБЩИЕ ЭЛЕМЕНТЫ === */
.divider {
  width: 220px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 140, 255, 0.55), transparent);
  position: relative; margin-bottom: 50px;
}
.divider::after {
  content: "♦";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #d36ab6; font-size: 8px;
  background: var(--bg-dark); padding: 0 8px;
  text-shadow: 0 0 6px rgba(220, 130, 200, 0.5);
}

/* Кнопка «назад» — в едином стиле с .btn-frame (градиент + Metamorphous) */
.back-btn {
  position: absolute; top: 24px; left: 28px;
  background: linear-gradient(180deg, rgba(40, 24, 60, 0.9), rgba(20, 12, 30, 0.9));
  border: 1px solid rgba(200, 140, 255, 0.5);
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-size: 12px; letter-spacing: 0.3em;
  color: #e8d4ff;
  padding: 11px 20px; cursor: pointer; z-index: 10;
  text-transform: uppercase; transition: all 0.25s ease;
  border-radius: 3px;
}
.back-btn:hover {
  color: #fff;
  border-color: #ff5fa8;
  box-shadow: 0 0 18px rgba(255, 95, 168, 0.3);
}

/* === МОДАЛКИ === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 3, 10, 0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; animation: fadeIn 0.3s ease;
}
.modal {
  background: linear-gradient(180deg, rgba(30, 18, 50, 0.97), rgba(15, 8, 22, 0.97));
  border: 1.5px solid rgba(200, 140, 255, 0.5);
  padding: 36px 44px; max-width: 480px;
  text-align: center; position: relative;
  border-radius: 6px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 32px rgba(160, 100, 230, 0.2);
}
.modal h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px; letter-spacing: 0.3em;
  color: #f0e0ff;
  text-shadow: 0 0 14px rgba(220, 180, 255, 0.45), 0 2px 4px #000;
  margin-bottom: 16px;
}
.modal p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; font-style: italic;
  color: #d8c8e8; line-height: 1.6; margin-bottom: 22px;
  white-space: pre-line;
}
.btn-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(40, 24, 60, 0.9), rgba(20, 12, 30, 0.9));
  border: 1px solid rgba(200, 140, 255, 0.5);
  padding: 14px 24px;
  font-family: 'Metamorphous', 'Cinzel', serif; letter-spacing: 0.3em;
  color: #e8d4ff; cursor: pointer;
  text-transform: uppercase; text-align: center;
  font-size: 13px; transition: all 0.25s ease;
  border-radius: 3px;
}
.btn-frame:hover {
  color: #fff;
  border-color: #ff5fa8;
  box-shadow: 0 0 18px rgba(255, 95, 168, 0.3);
}

/* === ДЕВ-КНОПКА === */
.dev-btn {
  position: fixed; bottom: 16px; left: 24px;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.2em;
  color: rgba(200, 140, 255, 0.45); background: transparent;
  border: 1px dashed rgba(200, 140, 255, 0.3);
  padding: 6px 12px; cursor: pointer;
  z-index: 5; text-transform: uppercase;
}
.dev-btn:hover { color: var(--gold); border-color: var(--gold); }

/* === ПОДСКАЗКА ЛИРОНА (внизу слева) === */
.lyron-tip {
  position: fixed;
  bottom: 22px; left: 22px;
  width: min(400px, 88vw);
  display: flex; align-items: stretch; gap: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(120,60,180,0.28), transparent 60%),
    linear-gradient(180deg, rgba(34,20,52,0.98), rgba(14,8,22,0.98));
  border: 1.5px solid rgba(200, 140, 255, 0.55);
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.7), 0 0 30px rgba(160, 80, 255, 0.22),
              inset 0 1px 0 rgba(220,180,255,0.1);
  z-index: 120;
  opacity: 0;
  transform: translateX(-30px) translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,1.2,.3,1);
  overflow: visible;
}
.lyron-tip.show { opacity: 1; transform: translateX(0) translateY(0); }

.lyron-tip-portrait {
  flex-shrink: 0;
  width: 86px; align-self: stretch;
  border-right: 1px solid rgba(200, 140, 255, 0.25);
  border-radius: 10px 0 0 10px;
  background: url('../assets/portraits/lyron.png') center top / cover no-repeat,
              radial-gradient(circle at 50% 30%, rgba(120,70,180,0.4), rgba(10,5,18,0.9));
  position: relative;
}
.lyron-tip-portrait::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 10px 0 0 10px;
  box-shadow: inset 0 0 24px rgba(120, 60, 180, 0.5);
  pointer-events: none;
}

.lyron-tip-body { padding: 14px 16px 15px; position: relative; }
.lyron-tip-name {
  font-family: 'Metamorphous', 'Cinzel', serif;
  font-size: 13px; letter-spacing: 0.22em;
  color: #e8c8ff;
  text-shadow: 0 0 10px rgba(200, 120, 240, 0.5);
  margin-bottom: 6px; text-transform: uppercase;
}
.lyron-tip-name span {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 11px;
  letter-spacing: 0.1em; color: rgba(200, 160, 240, 0.55);
  text-transform: none; text-shadow: none;
}
.lyron-tip-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; line-height: 1.45;
  color: #efe2cf; letter-spacing: 0.02em;
}
.lyron-tip-text b { color: #ff8fc8; font-weight: 600; font-style: normal; }

.lyron-tip-close {
  position: absolute; top: 6px; right: 8px;
  background: transparent; border: none;
  color: rgba(200, 160, 240, 0.5);
  font-size: 13px; cursor: pointer; padding: 2px 5px;
  transition: color 0.2s ease;
  z-index: 2;
}
.lyron-tip-close:hover { color: #ff8fc8; }

/* маленький "хвостик" уголка как у спич-баббла */
.lyron-tip::before {
  content: "";
  position: absolute; left: 30px; bottom: -9px;
  width: 16px; height: 16px;
  background: linear-gradient(135deg, transparent 50%, rgba(14,8,22,0.98) 50%);
  border-right: 1.5px solid rgba(200, 140, 255, 0.55);
  border-bottom: 1.5px solid rgba(200, 140, 255, 0.55);
  transform: rotate(45deg);
}
