:root {
  --accent: #7aa2f7;
  --accent-dim: #6685cc;
  --bg: rgba(15, 15, 20, 0.85);
  --text: #cfcfcf;
  --panel: rgba(30, 30, 40, 0.55);
  --shadow: 0 6px 30px rgba(0,0,0,0.6);
}

/* ——— Общий стиль ——— */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #0d0d0d url('bg.gif') center center / cover no-repeat;
  font-family: "Consolas", monospace;
  font-weight: 300;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.container {
  max-width: 720px;
  width: 90%;
  padding: 15px;
  background: var(--bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

/* ——— HEADER ——— */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: var(--panel);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
}
.header h1 {
  font-weight: 400;
  font-size: 1.3em;
  letter-spacing: 1px;
  color: var(--accent);
  display: flex;
  align-items: center;
  margin: 0;
}
.logo-gif {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(255,255,255,0.3);
  animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
  0%,100% {transform:scale(1);opacity:0.9;}
  50% {transform:scale(1.05);opacity:1;}
}

.navbar a {
  margin-left: 15px;
  color: var(--accent);
  text-decoration: none;
  font-size: 11pt;
  font-weight: 300;
  transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
  text-transform: lowercase;
}
.navbar a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent);
  transform: translateY(-1px);
}

/* ——— CARD ——— */
.card {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.sidebar {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar a {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  text-transform: lowercase;
  transition: all 0.25s;
}
.sidebar a:hover {
  background: rgba(122,162,247,0.15);
  color: #fff;
  padding-left: 10px;
  text-shadow: 0 0 6px var(--accent);
}
.sidebar-character {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  opacity: 0.8;
}
.content {
  flex: 1;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: transform .2s ease;
}
.content:hover {transform:translateY(-4px);}
.warning {
  align-self:flex-start;
  margin-top:20px;
  background:rgba(40,50,80,0.25);
  color:var(--accent);
  padding:8px 12px;
  border:1px dashed rgba(122,162,247,0.3);
  border-radius:8px;
  font-size:0.85em;
  text-transform:lowercase;
  opacity:0.9;
}

/* ——— POPUP ——— */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.45);
  z-index: 1200;
  padding: 20px;
}
.overlay.active { display: flex; }
.popup {
  width: 420px;
  max-width: calc(100% - 40px);
  background: rgba(20,25,35,0.95);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.03);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  position: relative;
}
.popup.active { opacity: 1; transform: translateY(0); }
.popup-close {
  position: absolute;
  right: 8px;
  top: 8px;
  background: transparent;
  border: none;
  color: rgba(200,200,200,0.9);
  font-size: 20px;
  cursor: pointer;
}
.popup h3 {
  margin: 0 0 8px 0;
  color: var(--accent);
}
.popup p {
  margin: 0;
  color: var(--text);
}

/* ——— TERMINAL ——— */
.terminal-window {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  max-width: 720px;
  height: 140px;
  background: rgba(20, 25, 35, 0.8);
  border: 1px dashed rgba(122,162,247,0.3);
  border-radius: 8px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  color: rgba(180, 200, 255, 0.8);
  padding: 8px 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  opacity: 0.95;
  z-index: 999;
}
.terminal-line { animation: fadeInTerm 0.2s ease; }
@keyframes fadeInTerm { from{opacity:0;transform:translateY(2px);} to{opacity:1;transform:translateY(0);} }
.term-log { max-height:86px; overflow-y:auto; }
.terminal-input { display:flex; align-items:center; gap:5px; margin-top:6px; }
.terminal-input span { color:var(--accent); }
.terminal-input input {
  flex:1;
  background:transparent;
  border:none;
  outline:none;
  color:rgba(200,220,255,0.9);
  font-family:inherit;
  font-size:inherit;
}
.terminal-input input::placeholder { color:rgba(180,200,255,0.3); }
