* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: #0a0e17;
  color: #e8eaef;
  font-family: system-ui, -apple-system, sans-serif;
}

body.orientation-blocked {
  overflow: hidden;
}

/* --- Screens --- */

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  gap: 1.25rem;
}

.screen h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: min(320px, 80vw);
  height: auto;
  display: block;
}

.screen h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.subtitle {
  color: #8a8f9a;
  font-size: 0.9rem;
  text-align: center;
  max-width: 480px;
  line-height: 1.6;
}

.error-text {
  color: #ff3b30;
  font-size: 0.85rem;
  min-height: 1.2em;
  text-align: center;
}

/* --- Instructions --- */

.instructions {
  max-width: 500px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  line-height: 1.7;
}

.instructions p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #c8cad0;
}

.instructions ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.instructions li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.92rem;
  color: #b0b3ba;
}

.instructions li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f8ff7;
}

/* --- Buttons --- */

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; }

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

.btn-primary {
  background: #4f8ff7;
  color: white;
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eaef;
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 100%;
  max-width: 180px;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
}

.btn-finish {
  background: #34c759;
}

/* --- Form --- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #8a8f9a;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e8eaef;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(79, 143, 247, 0.6);
}

.form-group select option {
  background: #1a1f2e;
  color: #e8eaef;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- Video Player Screen --- */

.screen-video {
  min-height: 0;
  height: 100vh;
  padding: 1rem;
  gap: 0.75rem;
  justify-content: flex-start;
}

.video-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
}

.video-counter {
  padding: 0.4rem 1rem;
  background: rgba(79, 143, 247, 0.15);
  color: #4f8ff7;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.video-area {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.test-mode .video-area video {
  pointer-events: auto;
}

.video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  color: #8a8f9a;
  font-size: 1rem;
  z-index: 4;
}

.video-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.video-bottom .btn-primary {
  max-width: 300px;
}

@media (max-width: 520px) {
  .video-bottom {
    flex-direction: column;
    align-items: center;
  }

  .video-bottom .btn-primary,
  .video-bottom .btn-secondary {
    max-width: 100%;
  }
}

/* --- Quiz Screen --- */

.quiz-header {
  color: #8a8f9a;
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Final Question --- */

.favorite-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 400px;
}

.favorite-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s;
}

.favorite-option:hover {
  border-color: rgba(79, 143, 247, 0.4);
  background: rgba(79, 143, 247, 0.06);
}

.favorite-option.selected {
  border-color: #4f8ff7;
  background: rgba(79, 143, 247, 0.12);
}

.favorite-option input[type="radio"] {
  accent-color: #4f8ff7;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.favorite-option span {
  font-size: 0.95rem;
}

/* --- Upload / Progress --- */

.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #4f8ff7;
  border-radius: 4px;
  transition: width 0.3s;
}

/* --- Thank You --- */

.thank-you-icon {
  font-size: 3.5rem;
  margin-bottom: 0.25rem;
}

/* --- Orientation guard --- */

.orientation-warning {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: #0a0e17;
  text-align: center;
}

.orientation-warning h2 {
  font-size: 1.35rem;
  font-weight: 600;
}

.orientation-warning p {
  max-width: 320px;
  color: #b0b3ba;
  line-height: 1.5;
}

.orientation-logo {
  width: min(260px, 70vw);
  height: auto;
}

.orientation-blocked .orientation-warning {
  display: flex;
}

/* --- Responsive --- */

@media (max-width: 600px) {
  .screen { padding: 1.25rem; }
  .form, .btn-primary, .instructions, .favorite-options { max-width: 100%; }
}
