/* ===== ОБЩЕЕ ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  background-color: #0a0a0a;
  color: #f5d67b;
  font-family: "Courier New", monospace;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  scroll-snap-align: start;
}

/* ===== ЭКРАН 1: ОБЛОЖКА ===== */

.topbar {
  width: 640px;
  max-width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  letter-spacing: 4px;
  font-weight: bold;
  font-size: 18px;
}

.card {
  width: 640px;
  max-width: 90%;
  aspect-ratio: 1 / 1;
  border: 2px dashed #f5d67b;
  box-shadow: 0 0 25px rgba(245, 214, 123, 0.25);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.card-head, .card-info {
  display: flex;
  justify-content: space-between;
}

.card-head {
  border-bottom: 1px solid #f5d67b;
  padding-bottom: 15px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
}

.card-body h1 {
  font-size: 72px;
  letter-spacing: 14px;
  margin-bottom: 18px;
  text-shadow: 0 0 15px rgba(245, 214, 123, 0.6);
}

.subtitle {
  font-style: italic;
  letter-spacing: 3px;
  font-size: 22px;
}

.card-info {
  border-top: 1px solid #f5d67b;
  border-bottom: 1px solid #f5d67b;
  padding: 15px 0;
  font-size: 16px;
}

.quote {
  font-size: 17px;
}

.buttons a {
  color: #f5d67b;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 2px;
  margin: 0 8px;
  font-size: 18px;
}

.buttons a {
  /* ... existing rules ... */
  white-space: nowrap;   /* кнопка никогда не разрывается на две строки */
}

.buttons a:hover {
  background-color: #f5d67b;
  color: #0a0a0a;
}

.hint {
  margin-top: 20px;
  font-size: 15px;
  opacity: 0.7;
}

/* ===== ЭКРАН 2: ФИЛОСОФИЯ ===== */

.philosophy-wrap {
  width: 1100px;
  max-width: 100%;
}

.section-title {
  font-size: 48px;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 30px;
  text-align: left;
}

.philosophy-columns {
  display: flex;
  gap: 50px;
  align-items: stretch;   /* левый блок растягивается ровно по высоте монитора */
}

/* ---- ЛЕВАЯ КОЛОНКА ---- */

.accordion-box {
  flex: 1;
  /* ФИКСИРОВАННУЮ ВЫСОТУ УБРАЛИ — высоту диктует монитор */
  border: 1px solid #f5d67b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.accordion-box details {
  flex: 0 0 auto;
  padding: 16px 22px;
  font-size: 17px;
  overflow: hidden;
  cursor: pointer;
}

.accordion-box details[open] {
  flex: 1 1 auto;         /* раскрытая панель забирает свободное место */
  cursor: default;
}

.accordion-box details:not(:last-child) {
  border-bottom: 1px solid #f5d67b;
}

.accordion-box details:hover {
  background: rgba(245, 214, 123, 0.08);
}

.accordion-box summary {
  list-style: none;
  letter-spacing: 2px;
  font-weight: bold;
}
.accordion-box summary::-webkit-details-marker {
  display: none;
}

.accordion-box summary::before {
  content: "▶ ";
}
.accordion-box details[open] summary::before {
  content: "▼ ";
}

.accordion-box details p {
  margin-top: 12px;
  font-weight: normal;
  line-height: 1.6;
}

/* ---- ПРАВАЯ КОЛОНКА: корпус монитора + экран 4:3 ---- */

.monitor {
  flex: 1;
  border: 3px solid #e8e8e8;
  border-radius: 14px;
  background: #111;
  padding: 22px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  /* именно ОН задаёт высоту всему ряду */
}

.crt {
  position: relative;
  width: 100%;
  border: 1px solid #555;
  border-radius: 30px;
  cursor: pointer;
  background: radial-gradient(ellipse at center, #2a2015 0%, #0a0a0a 75%);
  box-shadow: inset 0 0 60px rgba(245, 214, 123, 0.15);
  overflow: hidden;
}

.crt::before {
  content: "";
  display: block;
  padding-top: 75%;       /* 4:3: высота = 75% ширины */
}

.crt-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.crt-title {
  font-size: 32px;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-shadow: 2px 0 rgba(255, 0, 100, 0.4), -2px 0 rgba(0, 255, 255, 0.4);
}

.crt-text {
  letter-spacing: 2px;
  opacity: 0.9;
}

/* ===== ЭКРАН 3: РИТУАЛ ===== */

.ritual-wrap {
  width: 900px;
  max-width: 100%;
  text-align: left;
}

/* Широкая CRT-полоса: тот же трюк с padding, но пропорция ~ 3.5:1 */
.crt-strip {
  position: relative;
  width: 100%;
  border: 2px solid #666;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, #3a2508 0%, #120b02 80%);
  box-shadow:
    inset 0 0 50px rgba(255, 160, 40, 0.25),
    0 0 25px rgba(255, 160, 40, 0.15);
  overflow: hidden;
  margin-bottom: 40px;
}

.crt-strip::before {
  content: "";
  display: block;
  padding-top: 26%;        /* высота полосы = 26% ширины */
}

.crt-strip-inner {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 30px;
}

.crt-strip-inner p {
  color: #ffb84d;
  letter-spacing: 3px;
  font-size: 18px;
  text-shadow: 0 0 10px rgba(255, 160, 40, 0.6);
}

.ritual-text p {
  margin-bottom: 18px;
  line-height: 1.7;
}

/* Главная фраза — крупно, ярко, с лёгким свечением */
.lead {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(245, 214, 123, 0.4);
  margin-bottom: 25px;
}

.zebra {
  list-style: none;
  margin-bottom: 25px;
  line-height: 2.2;          /* чуть больше межстрочный — чтобы заливка не слипалась при переносе */
}

.zebra span {
  padding: 3px 8px;
}

.zebra span:nth-of-type(even) {   /* каждый ЧЁТНЫЙ span — с заливкой */
  background: rgba(245, 214, 123, 0.15);
  border: 1px solid rgba(245, 214, 123, 0.3);
}

/* Выделение условия: тот же цвет текста, но в рамке-боксе */
.condition-box {
  border: 1px solid #f5d67b;
  border-left: 4px solid #f5d67b;   /* утолщённый левый край — акцент */
  padding: 18px 22px;
  margin-bottom: 10px;
  line-height: 1.7;
  background: rgba(245, 214, 123, 0.05);
}

/* Квадратная кнопка, как на рефе */
.btn-square {
  display: inline-block;
  border: 2px solid #f5d67b;
  color: #f5d67b;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 3px;
  font-size: 18px;
  padding: 14px 30px;
  margin-top: 10px;
  transition: background 0.2s, color 0.2s;
}

.btn-square:hover {
  background-color: #f5d67b;
  color: #0a0a0a;
}

/* ===== МОБИЛЬНЫЙ ФОРМАТ ===== */
@media (max-width: 900px) {
  .philosophy-columns {
    flex-direction: column;
    gap: 25px;
  }

  .accordion-box {
    height: auto;          /* высота по содержимому — никакого лишнего места */
  }

  .accordion-box details[open] {
    flex: 0 0 auto;
  }

  /* Ограничиваем экран, чтобы на телефоне он не был гигантским */
  .monitor {
    width: 85%;
    margin: 0 auto;
  }
}

/* Видео внутри CRT-контейнеров */
.crt-video {
  position: absolute;      /* как .crt-inner — поверх пропорциональной подложки */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* 16:9 видео вписывается в 4:3 экран без искажений (бока обрежутся) */
  z-index: 0;              /* видео — нижний слой */
}

.crt-inner, .crt-strip-inner {
  z-index: 1;              /* текст — поверх видео */
}

/* ===== ФУТЕР: CREDITS ===== */

.credits-bar {
  background-color: #f5d67b;
  color: #0a0a0a;
  min-height: 25vh;              /* примерно 1/4 экрана */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 50px;
  scroll-snap-align: end;        /* защёлкивается нижним краем к низу экрана */
}

.credits-name {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
}

.credits-group,
.credits-note,
.credits-copy {
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.75;
  margin-top: 6px;
}

.credits-center {
  text-align: center;
}

.credits-brand {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 3px;
}

.credits-right {
  text-align: right;
}

.credits-visuals a {
  color: #0a0a0a;
  font-weight: bold;
  text-decoration: underline;
}

.credits-visuals a:hover {
  background: #0a0a0a;
  color: #f5d67b;
}

@media (max-width: 700px) {
  .credits-bar {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 25px 20px;
  }
  .credits-right {
    text-align: center;
  }
}
