/* Version: 0.0.0.1 */

:root {
  --accent-color: #e50914;
  --bg-color: #000000;
  --text-color: #f8f8f8;
  --panel-bg: #1a1a1a;
  --panel-border: #333;
  --btn-blue: #007bff;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  user-select: none;
}

@media (max-width: 767px) {
  main {
    padding-bottom: 60px;
  }
}
@media (min-width: 768px) {
  main {
    padding-left: 80px;
  }
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 10px;
}

@media (max-width: 767px) {
  .container {
    max-width: 100%;
    padding: 10px 15px;
  }
}
@media (min-width: 768px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
}

.header-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  color: var(--accent-color);
  font-size: 24px;
}

.search-box-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 4px 0;
  background-color: var(--bg-color);
  max-width: 480px;
  margin: 0 auto;
}
.form-control {
  border-radius: 12px 0 0 12px;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #222;
  color: #fff;
  border: none;
}
.form-control::placeholder {
  color: #aaa;
}
.form-control:focus {
  outline: none;
  box-shadow: none;
  background-color: #222;
  color: #fff;   
}

/* Кнопки */
.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  border-radius: 0 12px 12px 0;
  padding: 6px 16px;
  font-size: 16px;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background-color: #ff1a1a;
  border-color: #ff1a1a;
}
.btn-success {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  border-radius: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-success:hover {
  background-color: #ff1a1a;
  border-color: #ff1a1a;
}
.btn-success:active {
  background-color: var(--btn-blue) !important;
  border-color: var(--btn-blue) !important;
}

/* Панели и карточки */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: none !important;
}
#video-container .video-card {
  max-width: 480px;
  margin: 0 auto 10px;
}
.card {
  background: var(--panel-bg);
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  box-shadow: none !important;
  color: var(--text-color);
}
.card-img-top {
  border-bottom: 1px solid #222;
}
.card-title {
  font-weight: 600;
  margin-bottom: 12px;
}

/* Сообщения статуса */
.status-message {
  text-align: center;
  font-size: 12px;
  padding: 8px 10px;
  color: #aaa;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin: 6px auto;
  max-width: 400px;
  box-shadow: none !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.3s ease-in-out;
}
.status-message#loading {
  color: #ccc;
}
.status-message#end-message {
  color: #666;
}
.status-message#error-message {
  color: #ff6b6b;
}
.status-message.no-results {
  color: #999;
}
.status-message.custom-form {
  color: #ff6b6b;
}

/* Навигация */
.bottom-nav {
  background-color: var(--bg-color);
  border-top: 1px solid #222;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  user-select: none;
  transition: all 0.3s ease-in-out;
}
.nav-button {
  all: unset;
  flex: 1;
  color: #888;
  text-decoration: none;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
.nav-button.active {
  color: var(--accent-color);
}
.nav-button i {
  font-size: 24px;
  color: #888;
}
.nav-button.active i {
  color: var(--accent-color);
}
.nav-button span {
  margin-top: 1px;
}
.tab {
  display: none;
}
.tab.active {
  display: block;
}

/* Terms & Privacy */
.terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.terms-content {
  max-width: 400px;
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.terms-content h4 {
  margin-bottom: 12px;
  color: var(--text-color);
}
.terms-content p {
  color: var(--text-color);
  font-size: 14px;
  margin-bottom: 20px;
}
.terms-buttons {
  display: flex;
  justify-content: center;
}
#accept-btn {
  flex: 1;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  background-color: #28a745;
  color: #fff;
}

/* Адаптивная навигация для десктопа */
@media (min-width: 768px) {
  .bottom-nav {
    top: 0;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-top: none;
    border-right: 1px solid #222;
    box-shadow: none !important;
    padding-top: 20px;
  }
  .nav-button {
    flex: unset;
    margin-bottom: 24px;
    font-size: 12px;
  }
  .nav-button i {
    font-size: 24px;
  }
  .nav-button span {
    font-size: 11px;
    margin-top: 1px;
  }
}

/* Background video */
#background-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.20;
}

#background-video::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 0;
}

#background-video .container {
  position: relative;
  z-index: 1;
  padding-bottom: 100px;
}

/* ads */
.ad-overlay {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
  transform: translateX(-50%);
  z-index: 999;

  display: none;

  min-width: min(92vw, 520px);
  padding: 14px 24px;
  border-radius: 18px;

  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  text-decoration: none;
  color: #fff;

  background: linear-gradient(135deg, #ff0055, #ff2d6f);

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#video-container:has(*) + .ad-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}