@font-face {
  font-family: 'Zamenhof Plain';
  src: url('/fonts/zamenhof_plain.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Zamenhof Outline';
  src: url('/fonts/zamenhof_outline.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: url('../images/back.png') fixed no-repeat center;
  color: #ededed;
  font-family: 'Zamenhof Plain', 'Courier New', monospace;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.site-wrapper, .page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  gap: 15px;
}

.header-nav {
  display: flex;
  gap: 30px;
}

.nav-link-header {
  color: #ededed;
  text-decoration: none;
  font-family: 'Zamenhof Plain', monospace;
  font-size: 1.2rem;
  padding: 8px 0;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.nav-link-header:hover {
  text-shadow: 0 0 18px #5a00c9;
  border-bottom-color: #5a00c9;
}

.account-area {
  margin-left: auto;
}

.cabinet-btn {
  background: none;
  border: 2px solid #5a00c9;
  color: #ededed;
  font-family: 'Zamenhof Plain', monospace;
  font-size: 1.2rem;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px #5a00c9;
}

.cabinet-btn:hover {
  background: #5a00c9;
  box-shadow: 0 0 18px #5a00c9;
}

.hero.fullscreen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: -80px;
  padding-top: 80px;
  box-sizing: border-box;
}

.hero-content {
  max-width: 90%;
}

.hero-logo {
  max-width: 512px;
  width: 90%;
  height: auto;
  margin-bottom: 40px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.download-btn {
  background: linear-gradient(135deg, #5a00c9, #3a0080);
  border: none;
  color: white;
  font-family: 'Zamenhof Plain', monospace;
  font-size: 1.8rem;
  padding: 16px 48px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px #5a00c9;
  border-radius: 8px;
  letter-spacing: 2px;
}

.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #5a00c9;
  background: linear-gradient(135deg, #6a10e9, #4a0090);
}

.content-section {
  margin: 80px 0;
  padding: 40px 20px;
  background: rgba(24,24,24,0.9);
  border-left: 4px solid #5a00c9;
}

.section-title {
  font-family: 'Zamenhof Outline', 'Zamenhof Plain', monospace;
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 0 0 18px #5a00c9;
}

.section-title.outline {
  font-family: 'Zamenhof Outline', monospace;
}

.section-content {
  font-size: 1.2rem;
  line-height: 1.5;
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #181818;
  border: 2px solid #5a00c9;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 30px rgba(90,0,201,0.5);
  position: relative;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
  color: #ededed;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #5a00c9;
}

.tab-btn {
  background: none;
  border: none;
  color: #ededed;
  font-size: 1.2rem;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Zamenhof Plain', monospace;
  transition: 0.2s;
}

.tab-btn.active {
  border-bottom: 2px solid #5a00c9;
  text-shadow: 0 0 8px #5a00c9;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  background: #2a2a2a;
  border: 1px solid #5a00c9;
  color: #ededed;
  font-family: monospace;
  font-size: 1rem;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #5a00c9;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  margin-top: 10px;
  font-family: 'Zamenhof Plain', monospace;
  transition: 0.2s;
}

button[type="submit"]:hover {
  box-shadow: 0 0 18px #5a00c9;
}

/* Профиль и персонажи */
.profile-main {
  max-width: 800px;
  margin: 0 auto;
}

.profile-card {
  background: rgba(0,0,0,0.5);
  padding: 30px;
  border: 1px solid #5a00c9;
  margin-bottom: 40px;
}

.profile-info p {
  margin: 12px 0;
  font-size: 1.2rem;
}

.characters-section {
  margin: 40px 0;
}

.characters-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.character-card-full {
  background: #2a2a2a;
  border-left: 4px solid #5a00c9;
  padding: 20px;
  width: 100%;
  transition: transform 0.2s;
}

.character-card-full:hover {
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(90,0,201,0.3);
}

.character-name {
  font-family: 'Zamenhof Outline', monospace;
  font-size: 1.5rem;
  color: #ededed;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #5a00c9;
}

.character-info {
  font-size: 1rem;
  line-height: 1.4;
  color: #ccc;
}

.profile-tickets {
  margin-top: 40px;
}

.ticket-placeholder {
  background: #222;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  border-left: 3px solid #5a00c9;
  font-style: italic;
}

/* Правила — плавное раскрытие */
.rules-container {
  margin-top: 20px;
}

.rules-group {
  margin-bottom: 20px;
  border-left: 5px solid #9b59b6;
  background: rgba(90, 0, 201, 0.05);
  padding-left: 10px;
}

.rules-group-header {
  background: #2a2a2a;
  padding: 12px 20px;
  cursor: pointer;
  border-left: 3px solid #5a00c9;
  transition: 0.2s;
}

.rules-group-header:hover {
  background: #3a3a3a;
}

.rules-group-items {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 0;
}

.rules-group-items.open {
  max-height: 1000px;
}

.rule-item {
  margin-bottom: 10px;
  border-left: 3px solid #5a00c9;
  background: #222;
}

.rule-item-header {
  padding: 10px 15px;
  cursor: pointer;
  background: #2a2a2a;
  transition: 0.2s;
}

.rule-item-header:hover {
  background: #3a3a3a;
}

.rule-item-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 0;
  padding: 0 15px; /* отступы только по бокам, чтобы высота была 0 */
  background: #1e1e1e;
  border-top: 1px solid #5a00c9;
}

.rule-item-content.open {
  max-height: 1000px;
  padding: 10px 15px;
}

/* Тосты */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: #2a2a2a;
  color: #ededed;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 1rem;
  min-width: 250px;
  text-align: center;
  animation: fadeInUp 0.3s ease;
  pointer-events: auto;
  border-left: 5px solid;
}

.toast.success {
  border-left-color: #00c95a;
  background: #1e2a1e;
}

.toast.error {
  border-left-color: #c9002a;
  background: #2a1e1e;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .header-nav {
    justify-content: center;
    gap: 20px;
  }
  .account-area {
    text-align: center;
    margin-left: 0;
  }
  .cabinet-btn {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  .hero.fullscreen {
    margin-top: -60px;
    padding-top: 60px;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .download-btn {
    font-size: 1.2rem;
    padding: 12px 28px;
  }
  .character-card {
    width: 100%;
  }
  .section-title {
    font-size: 1.8rem;
  }
}