:root {
  --bg: #000000;
  --overlay-bg: rgba(15, 23, 42, 0.45);
  --overlay-bg-heavy: rgba(15, 23, 42, 0.65);
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.25);
  --border-soft: rgba(148, 163, 184, 0.35);
  --radius-pill: 999px;
  --radius-md: 14px;
  --transition-fast: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-overlay: 0 14px 40px rgba(0, 0, 0, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  overflow: hidden;
}

/* Корневой контейнер — на весь экран */

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

/* Видео-слой */

.video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

/* Общий стеклянный стиль */

.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.7);
}

.glass-panel--light {
  background: rgba(15, 23, 42, 0.38);
  border-color: rgba(148, 163, 184, 0.4);
}

.glass-panel--dark {
  background: rgba(15, 23, 42, 0.55);
}

/* Оверлеи */

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 14px 16px;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.overlay-top {
  top: 0;
  align-items: flex-start;
  transform: translateY(0);
}

.overlay-bottom {
  bottom: 0;
  align-items: flex-end;
  transform: translateY(0);
}

.overlay-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.overlay-hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-top.overlay-hidden {
  transform: translateY(-8px);
}

.overlay-bottom.overlay-hidden {
  transform: translateY(8px);
}

/* Верхний поиск */

.search-wrapper {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
}

.search-bar {
  display: flex;
  gap: 8px;
  padding: 6px 6px;
  border-radius: var(--radius-pill);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.95rem;
}

.search-bar input::placeholder {
  color: rgba(156, 163, 175, 0.8);
}

.search-btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.search-btn:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-0.5px);
}

.search-btn:active {
  transform: translateY(0);
}

.search-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Статус поиска */

.search-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 6px;
}

.search-status--error {
  color: #f97373;
}

/* Нижний блок */

.bottom-controls {
  width: 100%;
  max-width: 900px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  box-shadow: var(--shadow-overlay);
}

.bottom-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}

.meta-item {
  color: var(--text-muted);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-source::before {
  content: "Источник: ";
  color: var(--text-muted);
}

.meta-author::before {
  content: "Автор: ";
  color: var(--text-muted);
}

.play-status {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Правая часть (кнопки) */

.bottom-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.btn {
  border-radius: var(--radius-pill);
  border: none; /* без рамки */
  background: rgba(15, 23, 42, 0.7); /* мягкий фон */
  color: var(--text);
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
}

.btn:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-0.5px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* Кнопка исходника */

.source-link-btn {
  color: var(--accent);
  background: rgba(15, 23, 42, 0.7);
  padding-inline: 14px;
}

.source-link-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  color: #eff6ff;
}

/* Контролы плеера */

.ctrl-btn {
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7); /* лёгкий фон, без рамки */
}

.ctrl-btn--primary {
  background: rgba(15, 23, 42, 0.9);
}

.ctrl-btn:hover {
  background: rgba(15, 23, 42, 1);
}

.ctrl-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Центральное сообщение */

.center-message {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 0 24px;
  font-size: 1rem;
  color: var(--text-muted);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
  transition: opacity var(--transition-fast);
}

.center-message.center-message--hidden {
  opacity: 0;
}

/* Адаптивность */

@media (max-width: 640px) {
  .overlay {
    padding-inline: 10px;
  }

  .search-wrapper {
    padding-inline: 8px;
  }

  .bottom-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .bottom-right {
    justify-content: space-between;
  }

  .meta-item {
    max-width: 180px;
  }
}

/* Скрытый спрайт */

.hidden-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
