* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(180deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 100%);
  color: #e0e6ed;
  overflow-x: hidden;
  position: relative;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.bg-video.visible {
  opacity: 0.55;
}

.bg-video-shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.rain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      100deg,
      rgba(180, 200, 230, 0.06) 0px,
      rgba(180, 200, 230, 0.06) 1px,
      transparent 1px,
      transparent 12px
    );
  animation: rainFall 0.35s linear infinite;
  opacity: 0.5;
}

@keyframes rainFall {
  from { background-position: 0 0; }
  to { background-position: -20px 40px; }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: center;
}

header h1 {
  margin: 0 0 4px;
  font-weight: 300;
  letter-spacing: 1px;
}

.subtitle {
  margin: 0 0 32px;
  color: #9fb3c8;
  font-size: 0.9rem;
}

.url-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.url-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(159, 179, 200, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #e0e6ed;
  font-size: 0.95rem;
  outline: none;
}

.url-form input:focus {
  border-color: #6fa8dc;
}

.url-form button,
.controls button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: #3a6ea5;
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.url-form button:hover,
.controls button:not(:disabled):hover {
  background: #4d84c0;
}

.controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.player-box {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #9fb3c8;
}

.status {
  min-height: 20px;
  font-size: 0.85rem;
  color: #7f97ad;
}

.subtitle-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: 80vw;
  text-align: center;
  font-size: 1.6rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-shadow:
    0 0 12px rgba(150, 180, 220, 0.6),
    0 0 30px rgba(80, 110, 160, 0.4);
  filter: blur(0.2px);
  pointer-events: none;
  transition: opacity 0.15s ease-out;
  opacity: 0;
}

.subtitle-box.visible {
  opacity: 1;
  transition: opacity 0.05s ease-in;
}

@media (max-width: 600px) {
  .subtitle-box {
    font-size: 1.15rem;
    max-width: 90vw;
  }
}
