* { box-sizing: border-box; margin: 0; }
body {
  background: #10141c; color: #e8ecf4; min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #2a3448;
  position: sticky; top: 0; background: #10141c; z-index: 5;
}
h1 { font-size: 18px; }
nav { display: flex; gap: 8px; }
.tab, #logout {
  background: #1a2130; border: 1px solid #2a3448; color: #8fa0bc;
  border-radius: 9px; padding: 9px 14px; font-size: 15px; cursor: pointer;
}
.tab.active { color: #fff; border-color: #2f6fed; }
.tabpane { display: none; padding: 16px; max-width: 720px; margin: 0 auto; }
.tabpane.active { display: block; }

.wall { background: #1a2130; border: 1px solid #2a3448; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.wall-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wall-head h2 { font-size: 17px; flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5f5f; }
.dot.online { background: #ffc14d; }
.dot.ready { background: #3ddc84; }
.presence { font-size: 13px; color: #8fa0bc; }

.now { background: #10141c; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.now .title { font-size: 14px; margin-bottom: 8px; }
.bar { height: 6px; background: #2a3448; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.bar > div { height: 100%; background: #2f6fed; width: 0%; }
.stop {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700;
  background: #b3392f; color: #fff; border: 0; border-radius: 10px; cursor: pointer;
}

.buttons { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.play {
  padding: 14px; font-size: 16px; text-align: left;
  background: #223050; border: 1px solid #2f6fed55; color: #e8ecf4;
  border-radius: 10px; cursor: pointer;
}
.play.playing { border-color: #3ddc84; background: #1d3a2c; }
.both {
  padding: 14px 12px; font-size: 13px; white-space: nowrap;
  background: #1a2130; border: 1px solid #2a3448; color: #8fa0bc;
  border-radius: 10px; cursor: pointer;
}
button:disabled { opacity: .4; cursor: default; }
.empty { color: #8fa0bc; font-size: 14px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #b3392f; color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 15px; z-index: 10;
}

.admin-block { background: #1a2130; border: 1px solid #2a3448; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.admin-block h2 { font-size: 16px; margin-bottom: 12px; }
.admin-block input[type="text"], .admin-block input[type="number"], .admin-block select, .admin-block input[type="file"], .admin-block input[type="password"] {
  width: 100%; padding: 11px 12px; margin-bottom: 10px; border-radius: 9px;
  background: #10141c; border: 1px solid #2a3448; color: #e8ecf4;
  font-size: 16px; /* nie unter 16px — sonst zoomt iOS beim Fokussieren */
}
.admin-block label { display: block; font-size: 14px; color: #8fa0bc; margin-bottom: 4px; }
.admin-block button { padding: 12px 16px; border-radius: 9px; border: 0; background: #2f6fed; color: #fff; font-weight: 600; cursor: pointer; }
#video-list, #wall-urls { list-style: none; }
#video-list li, #wall-urls li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #2a3448; }
#video-list li:last-child, #wall-urls li:last-child { border-bottom: 0; }
#video-list .name { flex: 1; }
#video-list .size { color: #8fa0bc; font-size: 13px; }
#video-list .mini, #wall-urls .mini { background: #1a2130; border: 1px solid #2a3448; color: #8fa0bc; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
#wall-urls code { flex: 1; font-size: 12px; word-break: break-all; color: #8fa0bc; }

/* --------------------------- OBS-Vorschau --------------------------- */
.obs-card { background: #1a2130; border: 1px solid #2a3448; border-radius: 14px; padding: 12px; margin-bottom: 16px; }
.obs-card img { width: 100%; border-radius: 8px; display: block; margin-bottom: 10px; background: #000; }
.obs-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #8fa0bc; }
.obs-card .empty { margin-top: 8px; font-size: 13px; line-height: 1.5; }

/* ------------------------- Mobil-Optimierung ------------------------- */
/* Panel wird am Handy bedient: große Touch-Flächen, kein Zoom-Gefrickel. */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
button, .tab, select, input { touch-action: manipulation; }
/* iOS zoomt bei Fokus in Felder mit font-size < 16px hinein */
input, select { font-size: 16px; }

@media (max-width: 480px) {
  header { padding: 10px 12px; }
  h1 { font-size: 16px; }
  .tab, #logout { padding: 10px 12px; }
  .tabpane { padding: 12px; }
  .wall { padding: 12px; margin-bottom: 12px; }
  .play { padding: 17px 14px; font-size: 17px; }
  .both { padding: 17px 12px; font-size: 14px; }
  .stop { padding: 17px; font-size: 17px; }
  .bar { height: 8px; }
  .admin-block button { padding: 14px 16px; width: 100%; }
  #video-list .mini, #wall-urls .mini { width: auto; padding: 10px 12px; }
}
