:root {
  --primary: #0ea5e9;
  --secondary: #111827;
  --accent: #22c55e;
  --bg: #020617;
  --surface: #0f172a;
  --text: #f8fafc;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, rgba(14,165,233,.22), transparent 25%), var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100%;
}
body { min-height: 100vh; }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  position: sticky; top: 0; z-index: 10;
}
.brand-area { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  width: 58px; height: 58px; object-fit: contain; border-radius: 16px;
  background: rgba(255,255,255,.06); padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); flex-shrink: 0;
}
.brand-placeholder { display: grid; place-items: center; font-weight: bold; font-size: 1.1rem; }
.brand-title { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.brand-subtitle { font-size: .92rem; color: rgba(255,255,255,.72); line-height: 1.3; }

.install-btn, .btn {
  border: 0; border-radius: 16px; padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 30px rgba(14,165,233,.28);
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.install-btn:hover, .btn:hover { transform: translateY(-1px); }
.install-btn:active, .btn:active { transform: scale(.98); }

.main-content {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px; flex-direction: column;
}
.player-card {
  width: min(100%, 1200px);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.player-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 700; }
.status-dot {
  width: 12px; height: 12px; background: #22c55e; border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(34,197,94,.18);
}
.video-wrap { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 24px; overflow: hidden; }
video { width: 100%; height: 100%; display: block; background: #000; }
.empty-state {
  min-height: 300px; display: grid; place-items: center; border-radius: 24px;
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.7); font-size: 1.05rem;
  text-align: center; padding: 20px;
}
.admin-wrap { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
.admin-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
input[type="text"], input[type="url"], input[type="password"], input[type="color"], input[type="file"] {
  width: 100%; border-radius: 14px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: var(--text); padding: 12px 14px;
}
.switch { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.message { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; }
.success { background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.24); }
.error { background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.24); }
.preview-logo { max-height: 70px; max-width: 140px; object-fit: contain; display: block; margin-top: 8px; }

.install-note {
  margin: 0 0 18px; padding: 12px 16px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04); color: var(--text); border-radius: 14px;
  font-size: 14px; line-height: 1.5; width: min(100%, 1200px);
}

.install-help {
  position: fixed; inset: 0; background: rgba(0,0,0,.78); display: none;
  align-items: center; justify-content: center; z-index: 99999; padding: 20px;
}
.install-help.active { display: flex; }
.install-help-box {
  width: min(520px, 100%); background: var(--surface); color: var(--text);
  border-radius: 18px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
}
.install-help-box h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.install-help-box p { margin: 0 0 18px; line-height: 1.6; font-size: 16px; }
.install-help-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.install-help-actions button {
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700;
  cursor: pointer; background: var(--primary); color: #fff;
}

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-title { font-size: 1.05rem; }
  .brand-subtitle { font-size: .84rem; }
  .main-content { padding: 16px; }
  .player-card { padding: 14px; border-radius: 20px; }
  .install-btn, .btn { padding: 11px 16px; border-radius: 14px; font-size: 14px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; align-items: flex-start; }
  .brand-area { width: 100%; }
  .install-btn { width: 100%; justify-content: center; }
  .player-card { border-radius: 18px; }
  .video-wrap { border-radius: 18px; }
  .install-help-box { padding: 20px; }
  .install-help-box h3 { font-size: 20px; }
  .install-help-box p { font-size: 15px; }
}
