:root {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface2: #F0EDE8;
  --border: #E5E2DB;
  --text: #1A1A1A;
  --text-muted: #8C8C8C;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --danger: #D94040;
  --success: #16A34A;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.screen { min-height: 100dvh; }
.hidden { display: none !important; }

/* Login */
.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
  gap: 16px;
}

.login-box h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.login-box input {
  width: 200px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 18px;
  text-align: center;
  background: var(--surface);
  letter-spacing: 8px;
}

.login-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-box button {
  width: 200px;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.login-box button:hover { background: var(--accent-hover); }

.error {
  color: var(--danger);
  font-size: 14px;
  padding: 8px 12px;
  background: #FEE2E2;
  border-radius: 8px;
}

/* Container */
.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 16px;
}

.app-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* Player */
.player-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.select-group label,
.lang-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.select-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8C8C' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.select-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.lang-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  transition: all 0.15s;
}

.lang-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.lang-option input { display: none; }

.btn-primary {
  padding: 12px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; }

/* Status card */
.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.status-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.status-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.status-state {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-langs {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.status-state.playing { color: var(--success); }
.status-state.loading { color: var(--accent); }
.status-state.paused { color: #F59E0B; }

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 1s linear;
}

.progress-time {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-control {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s;
}

.btn-control:hover { background: var(--surface2); }
.btn-control.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-control.btn-danger:hover { background: #FEE2E2; }

/* Logout */
.logout-btn {
  display: block;
  margin: 40px auto 0;
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.logout-btn:hover { background: var(--surface2); color: var(--text); }

@media (max-width: 480px) {
  .btn-primary { width: 100%; }
}
