:root {
  --bg: #0a0a0b;
  --text: #fbe7e77a;
  --surface: rgba(18, 18, 18, 0.6);
  --border: rgba(55, 55, 55, 0.1);
  --accent: #ffb74a54;
}

* {
  font-family: 'Golos', sans-serif;
}

h1, h2, h3, h4, h5, h6, p, span, div, a, li, td, th {
  color: var(--text);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  text-align: center;
}

input, button {
  border-radius: 8px;
}

html {
  touch-action: manipulation;
}

body {
  background: var(--bg) url('resources/map.png') center / cover no-repeat;
  min-height: 100vh;
  position: relative;
  cursor: grab;
  color: var(--text);
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Golos', sans-serif;
  touch-action: manipulation;
}

body.dragging,
body.map-drag-active {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.dragging {
  cursor: grabbing;
}

#fog-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

#fog-wrapper #fog-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.header,
.intro-text,
footer,
body > a[href="https://alexcubor.com"],
.character-corner {
  position: relative;
  z-index: 1;
}

.character-corner {
  position: fixed;
  bottom: 0;
  right: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  transform-origin: bottom right;
}

.character-corner img {
  height: 420px;
  width: auto;
  display: block;
}

.character-speech {
  position: absolute;
  right: 255px;
  left: auto;
  bottom: 140px;
  max-width: 170px;
  width: max-content;
  color: #000;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.character-speech-main {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  margin: 0 0 6px 0;
  color: #000;
}

.character-speech-link {
  color: #000;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

.character-speech-link:hover {
  color: #000;
  text-decoration: underline;
}

.character-speech-link .char-link-underline {
  color: #000;
  text-decoration: underline;
}

.character-speech-sub {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  margin: -10px 0 0 0;
  opacity: 0.9;
  color: #000;
}

button {
  background: rgb(26 26 26 / 60%);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  width: 100%;
  transition: all 0.3s ease;
}

button:hover {
  box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.2);
}

input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

input:hover {
  box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.05);
}

input::placeholder {
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

canvas {
  outline: none;
}

canvas:focus {
  outline: none;
}
div, form{
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: auto;
  min-height: fit-content;
  }

  @keyframes modalFadeIn {
    from {
      opacity: 0;
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
    }
    to {
      opacity: 1;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
  }

  /* Шапка: логотип + навигация */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .header > div {
    align-items: center;
    text-align: center;
  }

  .header > div p {
    text-align: center;
  }

  nav ul {
    justify-content: center;
  }
}

.header > div > a {
  display: inline-flex;
  text-decoration: none;
  transition: filter 0.2s ease;
}

.header > div > a img {
  width: auto;
  display: block;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

nav ul li a:hover {
  filter: brightness(1.1) contrast(1.1);
}

nav .nav-order-map-hidden {
  display: none;
}

nav ul li a img {
  height: 38px;
  width: auto;
  display: block;
  border-radius: 6px;
}

  /* Вступительный текст */
.intro-text {
  position: fixed;
  top: 24px;
  right: 24px;
  font-family: 'Bona Nova SC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 181%;
  letter-spacing: -0.05em;
  text-align: right;
  max-width: 360px;
  color: #f3f3f3e3;
}

@media (max-width: 768px) {
  .intro-text {
    position: static;
    top: auto;
    right: auto;
    text-align: center;
    margin: 48px auto 0;
    max-width: 360px;
    padding: 0 16px;
  }
}

  /* Основные стили */
.container {
  background: var(--surface);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  padding: 30px;
  gap: 40px;
  border-radius: 15px;
}
