/* baseline reset (auto-injected) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:root {
  --primary: #e63946;
  --accent: #f1c40f;
  --background: #0b0b12;
  --surface: #1a1a22;
  --text: #f5f0e6;
  --text-muted: #a89f92;
  --space-sm: clamp(8px, 1.5vw, 12px);
  --space-md: clamp(14px, 2.5vw, 24px);
  --space-lg: clamp(24px, 5vw, 48px);
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.body {
  position: relative;
  display: block;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--text);
  cursor: pointer;
  padding: 20px;
  background: var(--background);
}

.body * {
  box-sizing: border-box;
}

.cinema-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.webp");
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.cinema-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
              linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.notification-toast {
  position: absolute;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(26, 26, 34, 0.85);
  border: 1px solid rgba(241, 196, 15, 0.35);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: clamp(12px, 2.5vw, 14px);
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  user-select: none;
  animation: toast-in 0.5s ease-out both;
  max-width: calc(100% - 40px);
  text-align: center;
  overflow-wrap: break-word;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 8, 0.6);
  z-index: 10;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin: auto;
  width: min(400px, calc(100% - 40px));
  height: fit-content;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(26, 26, 34, 0.98), rgba(11, 11, 18, 0.98));
  border: 1px solid rgba(241, 196, 15, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  box-shadow: var(--shadow-soft);
  cursor: default;
}

.modal__img.close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 20px;
  height: 20px;
  cursor: pointer;
  filter: brightness(1.4);
}

.modal__text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.modal__img.bell {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 12px rgba(230, 57, 70, 0.6));
  pointer-events: none;
  user-select: none;
}

.modal__text {
  font-size: clamp(15px, 4vw, 17px);
  line-height: 1.5;
  color: var(--text);
  max-width: 320px;
  overflow-wrap: break-word;
}

.modal__btns {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  width: 100%;
}

.button {
  flex: 1;
  min-height: 48px;
  border: 1px solid rgba(245, 240, 230, 0.25);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.button:hover {
  color: var(--text);
  background: rgba(245, 240, 230, 0.06);
}

.button:active {
  transform: scale(0.97);
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button--primary {
  background: linear-gradient(135deg, var(--primary), #b8202c);
  color: var(--text);
  border: 1px solid rgba(241, 196, 15, 0.5);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
}

.button--primary:hover {
  background: linear-gradient(135deg, #f04653, var(--primary));
  box-shadow: 0 10px 28px rgba(230, 57, 70, 0.5);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(72px, 18vw, 110px);
  height: clamp(72px, 18vw, 110px);
  z-index: 4;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 30px rgba(241, 196, 15, 0.55));
  animation: play-pulse 2.4s ease-in-out infinite;
}

@keyframes play-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

.toolbar {
  position: absolute;
  left: var(--space-md);
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  user-select: none;
}

.progress {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(245, 240, 230, 0.2);
  overflow: hidden;
}

.bar {
  width: 12%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.controls,
.settings {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.toolbar > .controls {
  justify-content: space-between;
}

.control-img {
  width: 22px;
  height: 22px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.time {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.settings {
  position: absolute;
  right: 0;
  bottom: 40px;
}

.hidden {
  display: none !important;
}

@media (min-width: 480px) {
  [dir=rtl] .modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 768px) {
  .modal {
    width: 420px;
    padding: var(--space-lg);
  }

  .modal__text {
    font-size: 17px;
  }

  .toolbar {
    left: var(--space-lg);
    right: var(--space-lg);
    bottom: var(--space-lg);
  }

  .settings {
    right: 0;
    bottom: 48px;
  }
}

@media (min-width: 1024px) {
  .play-button {
    width: 120px;
    height: 120px;
  }

  .notification-toast {
    font-size: 14px;
    top: var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-button {
    animation: none;
  }

  .notification-toast {
    animation: none;
  }
}

html,
body {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
