@font-face {
  font-family: 'Tomorrow';
  src: url('tomorrow/Tomorrow-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tomorrow';
  src: url('tomorrow/Tomorrow-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #ffffff;
  --accent: #ffffff;
  --glass-gradient: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);
  --glass-shadow:
    0 0 15px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  --radius: 12px;
  --transition: 600ms cubic-bezier(.2, .9, .2, 1);
}

* { box-sizing: border-box; }

button, input, select, textarea {
  font-family: inherit;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Tomorrow', sans-serif;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
}

.stage {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 0 120px;
  gap: 28px;
}

.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition);
  background: black;
  filter: contrast(1.1) brightness(0.8) saturate(0);
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8));
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.splash img {
  max-width: 90%;
  max-height: 90%;
  filter: drop-shadow(0 0 20px var(--accent));
  border-radius: 10px;
}

.center-card {
  position: relative;
  z-index: 4;
  width: min(900px, 92%);
  max-height: 68vh;
  flex-shrink: 0;
  background: rgba(10, 15, 20, 0.75);
  background-image: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(18px) scale(.995);
  transition: opacity 700ms ease, transform 700ms ease;
  backdrop-filter: blur(12px);
}

.comments-section {
  position: relative;
  z-index: 4;
  width: min(900px, 92%);
  flex-shrink: 0;
  background: rgba(10, 15, 20, 0.75);
  background-image: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 24px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
  backdrop-filter: blur(12px);
}

.comments-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.comments-section h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
}

.comments-lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.4;
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.comment-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  letter-spacing: 0.6px;
}

.comment-field input,
.comment-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  text-shadow: none;
  letter-spacing: 0.3px;
}

.comment-field input:focus,
.comment-field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.comment-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

.comment-field-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.comment-field-meta.over-limit {
  color: #ff9b9b;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.comment-status.error { color: #ff9b9b; }
.comment-status.success { color: #9dffc0; }

.comments-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comments-list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.comments-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.comments-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.comments-list::-webkit-scrollbar { width: 10px; }
.comments-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}
.comments-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #555, #333);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.comment-item {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.comment-item:first-child {
  border-top: none;
  padding-top: 0;
}

.comment-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.comment-item-name {
  font-weight: 700;
  font-size: 15px;
  word-break: break-word;
}

.comment-item-date {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.3px;
}

.comment-item-message {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: none;
}

.comments-empty,
.comments-loading {
  margin: 0;
  padding: 8px 0 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.center-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-title {
  font-weight: 700;
  font-size: clamp(24px, 3vw, 36px);
  margin: 0 0 12px;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.card-body {
  color: var(--fg);
  font-size: 18px;
  line-height: 1.4;
  overflow: auto;
  /* Room for .menu-link hover glow (box-shadow + lift) inside overflow clip. */
  padding: 8px 12px;
}

.card-body::-webkit-scrollbar { width: 10px; }
.card-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  margin: 5px;
}
.card-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #555, #333);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.2);
}
.card-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), #555);
}

.bottom-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 6;
  margin: 0 auto;
  max-width: 1200px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.6);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 99px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.menu-left {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.audio-toggle-top {
  position: fixed;
  top: 20px;
  right: 20px;
  left: auto;
  z-index: 7;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.menu-link,
.btn {
  color: var(--fg);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 16px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  transition: var(--transition);
  text-shadow: 0 1px 2px black;
  cursor: pointer;
  font-family: inherit;
}

a.btn {
  display: inline-block;
}

.menu-link:hover,
.menu-link.active,
.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px var(--accent);
  text-shadow: 0 0 5px var(--accent);
  transform: translateY(-2px);
  color: #fff;
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.has-bottom-nav {
  padding-bottom: 88px;
}

@media (max-width: 720px) {
  .stage { padding: 56px 0 110px; gap: 20px; }
  .center-card { max-height: 55vh; padding: 18px; }
  .comments-section { padding: 18px; }
  .bottom-menu { left: 10px; right: 10px; padding: 8px 12px; bottom: 12px; }
  .menu-left { gap: 4px; }
  .audio-toggle-top { top: 12px; right: 12px; }
}

.fade-out { animation: fadeOut 800ms forwards; }

@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; transform: scale(.995); }
}

.fullscreen-btn {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  right: max(0.5rem, env(safe-area-inset-right));
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: var(--transition);
  text-shadow: 0 1px 2px black;
}

.fullscreen-btn:hover,
.fullscreen-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--fg);
  box-shadow: 0 0 10px var(--accent);
  text-shadow: 0 0 5px var(--accent);
  transform: translateY(-2px);
}

.fullscreen-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hidden { display: none; }

@media (hover: none) and (pointer: coarse) {
  .fullscreen-btn { width: 44px; height: 44px; }
  .fullscreen-btn svg { width: 20px; height: 20px; }
}
