/* 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 {
  --color-primary: #c81e2c;
  --color-accent: #ff4d5e;
  --color-bg: #0a0a0d;
  --color-surface: #1a1a1f;
  --color-text: #f5f5f5;
  --color-text-muted: #a8a8b0;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.hidden {
  display: none !important;
}

.body {
  position: relative;
  display: block;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, Roboto, Helvetica, sans-serif;
  cursor: pointer;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

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

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

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.notification-toast {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(26, 26, 31, 0.9);
  border: 1px solid rgba(200, 30, 44, 0.4);
  border-radius: 999px;
  padding: 10px 18px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.4s ease-out;
  max-width: calc(100% - 32px);
}

.notification-toast__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.notification-toast__text {
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 60px));
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  z-index: 3;
  animation: modal-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.modal__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.modal__img.warning {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: none;
  user-select: none;
  pointer-events: none;
}

.modal__title {
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  color: rgb(0, 0, 0);
  margin: 0;
  padding: 0;
  flex: 1;
}

.modal__img.close {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 150ms ease;
  margin-left: auto;
  flex-shrink: 0;
}

.modal__img.close:hover {
  opacity: 1;
}

.modal__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-sm);
  margin-bottom: 16px;
  width: 100%;
}

.modal__text {
  font-size: 15px;
  line-height: 22px;
  color: rgb(0, 0, 0);
  font-weight: 400;
  overflow-wrap: break-word;
  margin: 0;
  padding: 0;
}

.modal__btns {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  padding-bottom: 16px;
}

.button {
  border: 1px solid #cccccc;
  background: #f5f5f5;
  color: #333333;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
  height: 42px;
  width: auto;
  min-width: 78px;
}

.button:hover {
  border-color: #999999;
  color: var(--color-text);
  background-color: #e8e8e8;
}

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

.button:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.button--primary {
  background: rgb(59, 130, 246);
  border: 1px solid rgb(59, 130, 246);
  color: rgb(255, 255, 255);
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 400;
  height: 42px;
  border-radius: 8px;
  min-width: 78px;
}

.button--primary:hover {
  background: #0052a3;
}

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

.button--secondary {
  background: rgb(255, 255, 255);
  border: 1px solid rgb(59, 130, 246);
  color: rgb(59, 130, 246);
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 400;
  height: 42px;
  border-radius: 8px;
  min-width: 78px;
}

.button--secondary:hover {
  background-color: #e8e8e8;
  border-color: #999999;
}

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

.toolbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 2;
  pointer-events: auto;
}

.progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  order: -1;
}

.bar {
  width: 12%;
  height: 3px;
  background: rgb(255, 0, 0);
}

.toolbar__content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  gap: 12px;
}

.controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.settings {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.control-img {
  width: 40px;
  height: 40px;
  opacity: 1;
  filter: none;
  user-select: none;
  flex-shrink: 0;
}

.time {
  color: rgb(255, 255, 255);
  font-size: 19px;
  white-space: nowrap;
  line-height: 1;
  font-weight: 400;
  font-family: -apple-system, Roboto, Helvetica, sans-serif;
  min-width: 70px;
  flex-shrink: 0;
}

.modal__text-wrapper {
  display: none;
}

@media (min-width: 480px) {
  [dir=rtl] .modal {
    top: calc(50% - 85px);
    right: calc(50% - 190px);
    left: auto;
    transform: initial;
  }
}

@media (min-width: 768px) {
  .modal {
    width: min(420px, calc(100% - 60px));
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
  }

  .notification-toast__text {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .toolbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 2;
    pointer-events: auto;
  }

  .modal {
    width: min(420px, calc(100% - 60px));
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 16px;
  }
}

@media (max-width: 400px) {
  .control-img {
    width: 28px;
    height: 28px;
  }

  .controls,
  .settings {
    gap: 8px;
  }

  .toolbar__content {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-toast,
  .modal {
    animation: none;
  }

  .button,
  .button--primary,
  .modal__img.close {
    transition: none;
  }
}

html,
body {
  scrollbar-width: none;
}

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