@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #080b14;
  --panel: #101727;
  --text: #f7f9ff;
  --muted: #9aa8bd;
  --blue: #2788ff;
  --cyan: #38d5f2;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -25%, rgba(39,136,255,.2), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.player-shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 76px 18px 18px;
}

.player-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 4px 12px;
  color: #dce7f8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff405d;
  box-shadow: 0 0 12px rgba(255,64,93,.8);
}

.player-brand {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: .12em;
}

#main-iframe {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 1px solid rgba(151,177,219,.16);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 22px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.025) inset;
}

#main-iframe[hidden] { display: none; }

.telegram-btn {
  position: fixed;
  z-index: 5;
  top: 16px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 6px 15px 6px 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  background: linear-gradient(120deg, #2699ff, #1763d6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(0,95,220,.3);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.telegram-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(0,95,220,.42);
}

.telegram-btn:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.telegram-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px;
  background: rgba(255,255,255,.15);
}

.telegram-icon svg { width: 17px; height: 17px; fill: currentColor; }
.button-arrow { margin-left: 3px; opacity: .85; }

.status {
  position: absolute;
  inset: 50% 18px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(-35%);
  color: var(--muted);
  text-align: center;
}

.status p { margin: 0; font-size: 14px; }
.status h2 { margin: 0; color: var(--text); font-size: clamp(19px, 4vw, 27px); }
.status.is-error p { margin-top: -5px; }

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .player-shell { padding: 72px 9px 9px; }
  .telegram-btn { top: 12px; left: 10px; min-height: 42px; border-radius: 12px; }
  .player-topline { min-height: 32px; padding-bottom: 9px; font-size: 10px; }
  #main-iframe { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
