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

:root {
  --bg: #07090d;
  --bg-2: #0b0f15;
  --surface: #10151d;
  --surface-2: #151b24;
  --surface-3: #1a222d;
  --text: #f4f7fb;
  --muted: #99a4b3;
  --faint: #687383;
  --line: rgba(255,255,255,.095);
  --line-strong: rgba(255,255,255,.17);
  --accent: #62f5c8;
  --accent-2: #3ea6ff;
  --danger: #ff6b7d;
  --warning: #ffc766;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
  --panel: 410px;
  --topbar: 72px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { height: 100%; min-height: 100dvh; background: var(--bg); }
.topbar {
  position: relative; z-index: 30; height: var(--topbar); display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 0 14px; border-bottom: 1px solid var(--line); background: rgba(7,9,13,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.topbar__left, .topbar__actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; height: 44px; margin-left: 5px; }
.brand img { width: 162px; height: auto; display: block; }
.icon-button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px;
  background: transparent; color: #dbe2eb; cursor: pointer; transition: background .18s, color .18s, transform .18s;
}
.icon-button:hover { background: rgba(255,255,255,.07); color: #fff; }
.icon-button:active { transform: scale(.95); }
.mode-switch { display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.mode-switch__button {
  height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px;
  color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; transition: .18s ease;
}
.mode-switch__button svg { width: 18px; height: 18px; }
.mode-switch__button.is-active { background: var(--text); color: #07100e; box-shadow: 0 7px 22px rgba(0,0,0,.22); }

.workspace { height: calc(100% - var(--topbar)); display: grid; grid-template-columns: minmax(0,1fr) var(--panel); }
.stage { position: relative; overflow: hidden; min-width: 0; background: radial-gradient(circle at 50% 47%, #172331 0, #0a0e14 36%, #06080c 72%); }
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgba(255,255,255,.5) .65px, transparent .65px);
  background-size: 47px 47px; mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.stage__ambient { position: absolute; width: 62vw; height: 62vw; min-width: 550px; min-height: 550px; left: 50%; top: 47%; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle, rgba(62,166,255,.13), transparent 62%); filter: blur(18px); pointer-events: none; }
.globe { position: absolute; inset: 0; }
.globe canvas { display: block; }
.globe-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; color: var(--muted); text-align: center; padding: 30px; }
.globe-fallback__sphere { width: min(53vw, 520px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(98,245,200,.55); background: radial-gradient(circle at 32% 30%, #23445c, #0e2634 50%, #061016 72%); box-shadow: inset -50px -25px 90px rgba(0,0,0,.65), 0 0 90px rgba(62,166,255,.16); }
.stage__hint, .stage__status { position: absolute; z-index: 5; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(9,12,17,.7); backdrop-filter: blur(12px); color: var(--muted); font-size: 12px; font-weight: 600; }
.stage__hint { left: 22px; bottom: 22px; padding: 10px 13px; border-radius: 12px; }
.stage__hint svg { width: 17px; height: 17px; color: var(--accent); }
.stage__status { right: 22px; top: 18px; padding: 9px 12px; border-radius: 999px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(98,245,200,.08), 0 0 15px rgba(98,245,200,.7); flex: none; }
.stage__status.is-warning .status-dot { background: var(--warning); box-shadow: 0 0 0 5px rgba(255,199,102,.08); }

.browser-panel { min-width: 0; border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 10; }
.panel-handle { display: none; }
.panel-header { min-height: 124px; padding: 23px 18px 17px; display: flex; align-items: flex-start; gap: 8px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.025), transparent); }
.panel-header__back { margin: -4px 1px 0 -8px; flex: none; }
.panel-header__copy { min-width: 0; flex: 1; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .16em; }
.panel-header h1 { margin: 0; font-size: 21px; line-height: 1.22; letter-spacing: -.035em; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-header__copy > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-header__time { flex: none; color: #cbd3dd; font-size: 11px; font-weight: 600; margin-top: 17px; }

.player { flex: none; border-bottom: 1px solid var(--line); background: #080b0f; }
.player__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #020304; }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.player audio { display: none; }
.player__poster, .player__loading, .player__error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.player__poster { flex-direction: column; gap: 9px; background: radial-gradient(circle at 50% 30%, #15232f, #080b10 66%); }
.player__poster-mark img { width: 58px; height: 58px; filter: drop-shadow(0 8px 22px rgba(62,166,255,.25)); }
.player__poster p { margin: 3px 0 0; font-size: 14px; font-weight: 750; }
.player__poster span { color: var(--muted); font-size: 11px; }
.player__loading { gap: 10px; background: rgba(2,3,4,.76); font-size: 12px; color: #dce3ea; }
.spinner { width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__error { padding: 18px; gap: 12px; background: rgba(9,10,13,.94); justify-content: flex-start; }
.player__error svg { width: 30px; height: 30px; color: var(--danger); flex: none; }
.player__error div { display: flex; flex-direction: column; gap: 4px; }
.player__error strong { font-size: 13px; }
.player__error span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.now-playing { min-height: 62px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.favorite-button { width: 40px; height: 40px; flex: none; }
.favorite-button .star-fill { display: none; color: var(--accent); }
.favorite-button.is-favorite .star-fill { display: block; }
.favorite-button.is-favorite .star-outline { display: none; }
.now-playing__copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.now-playing__copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing__copy span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-play-button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #07100e; cursor: pointer; display: grid; place-items: center; }
.audio-play-button svg { width: 19px; height: 19px; stroke-width: 2.3; }
.audio-play-button .pause-icon { display: none; }
.audio-play-button.is-playing .pause-icon { display: block; }
.audio-play-button.is-playing .play-icon { display: none; }

.panel-toolbar { flex: none; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.inline-search { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 9px 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #0b1016; }
.inline-search > svg { width: 17px; height: 17px; color: var(--muted); }
.inline-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.inline-search input::placeholder { color: var(--faint); }
.inline-search button { width: 29px; height: 29px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.inline-search button:hover { background: rgba(255,255,255,.07); }
.inline-search button svg { width: 16px; height: 16px; }
.filter-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; transition: .18s; }
.filter-chip:hover { border-color: var(--line-strong); color: #fff; }
.filter-chip.is-active { background: rgba(98,245,200,.11); border-color: rgba(98,245,200,.35); color: var(--accent); }
.directory { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #28313d transparent; scrollbar-width: thin; }
.directory-list { list-style: none; margin: 0; padding: 6px 0 18px; }
.directory-item { position: relative; display: flex; align-items: center; min-height: 60px; margin: 0 7px; border-radius: 12px; transition: background .16s; }
.directory-item:hover { background: rgba(255,255,255,.045); }
.directory-item.is-current { background: linear-gradient(90deg, rgba(98,245,200,.1), rgba(62,166,255,.055)); }
.directory-item.is-current::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 999px; background: var(--accent); }
.directory-item__main { min-width: 0; flex: 1; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.item-flag { width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.035); font-size: 21px; overflow: hidden; }
.item-logo { width: 38px; height: 38px; object-fit: contain; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.93); }
.item-radio-mark { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(98,245,200,.16), rgba(62,166,255,.13)); border: 1px solid rgba(98,245,200,.18); color: var(--accent); }
.item-radio-mark svg { width: 19px; height: 19px; }
.item-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.item-copy strong { font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-copy span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { margin-left: auto; padding-left: 8px; color: var(--faint); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; flex: none; }
.item-favorite { width: 37px; height: 37px; flex: none; margin-right: 5px; }
.item-favorite svg { width: 18px; height: 18px; }
.item-favorite.is-favorite { color: var(--accent); }
.chevron { width: 17px; height: 17px; margin-right: 7px; color: var(--faint); }
.skeleton-list { padding: 8px 11px; }
.skeleton-row { height: 54px; margin: 6px 0; border-radius: 12px; background: linear-gradient(90deg, #10161e 0, #17202a 48%, #10161e 100%); background-size: 220% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -220% 0; } }
.empty-state { min-height: 280px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state svg { width: 32px; height: 32px; color: var(--faint); }
.empty-state h2 { margin: 18px 0 7px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.drawer-overlay { position: fixed; z-index: 80; inset: 0; background: rgba(0,0,0,.58); backdrop-filter: blur(5px); opacity: 0; transition: opacity .24s; }
.drawer-overlay.is-visible { opacity: 1; }
.drawer { position: fixed; z-index: 90; inset: 0 auto 0 0; width: min(340px, 88vw); display: flex; flex-direction: column; background: #0b0f15; border-right: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-102%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.drawer.is-open { transform: translateX(0); }
.drawer__header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); }
.drawer__header img { width: 151px; }
.drawer__nav { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 9px 18px; scrollbar-width: thin; }
.drawer-link { width: 100%; min-height: 47px; display: flex; align-items: center; gap: 13px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #c4ccd7; text-align: left; font-size: 12px; font-weight: 600; cursor: pointer; }
.drawer-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.drawer-link.is-active { background: rgba(98,245,200,.085); color: var(--accent); }
.drawer-link svg { width: 19px; height: 19px; flex: none; }
.drawer-link span { flex: 1; }
.drawer-link b { min-width: 23px; height: 23px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 9px; color: var(--muted); }
.drawer-divider { height: 1px; margin: 10px 10px; background: var(--line); }
.drawer-label { margin: 15px 12px 6px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.drawer__footer { min-height: 68px; padding: 13px 19px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.drawer__footer small { color: var(--faint); }

.content-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(760px, calc(100dvh - 36px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; color: var(--text); background: #0d1219; box-shadow: 0 30px 100px rgba(0,0,0,.62); overflow: hidden; }
.content-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(8px); }
.dialog__header { position: sticky; top: 0; z-index: 2; min-height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 18px 17px 16px 24px; border-bottom: 1px solid var(--line); background: rgba(13,18,25,.95); backdrop-filter: blur(15px); }
.dialog__header h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.dialog__body { max-height: calc(min(760px, 100dvh - 36px) - 86px); overflow-y: auto; padding: 24px 25px 35px; color: #c6ced8; font-size: 13px; line-height: 1.75; }
.dialog__body h3 { margin: 27px 0 8px; color: #fff; font-size: 16px; line-height: 1.35; }
.dialog__body h3:first-child { margin-top: 0; }
.dialog__body p { margin: 0 0 13px; }
.dialog__body a { color: var(--accent); }
.dialog__body ul { padding-left: 20px; }
.dialog-callout { margin: 20px 0; padding: 15px 16px; border: 1px solid rgba(98,245,200,.2); border-radius: 14px; background: rgba(98,245,200,.06); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.primary-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 11px; background: var(--accent); color: #07100e !important; text-decoration: none; font-weight: 800; font-size: 11px; }
.secondary-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 11px; color: #fff !important; text-decoration: none; font-weight: 700; font-size: 11px; }

.toast-stack { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 240px; max-width: min(390px, calc(100vw - 24px)); padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(15,20,28,.94); box-shadow: 0 12px 45px rgba(0,0,0,.4); color: #e9eef4; font-size: 11px; font-weight: 600; text-align: center; animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

@media (max-width: 960px) {
  :root { --panel: 365px; }
  .stage__hint span { display: none; }
  .stage__hint { padding: 10px; }
}

@media (max-width: 760px) {
  body { overflow: hidden; }
  :root { --topbar: 64px; }
  .topbar { padding: 0 8px; }
  .brand img { width: 136px; }
  .topbar__actions { gap: 2px; }
  .mode-switch { padding: 3px; }
  .mode-switch__button { width: 37px; padding: 0; justify-content: center; }
  .mode-switch__button span { display: none; }
  .topbar__actions > .icon-button { width: 39px; }
  .workspace { position: relative; display: block; height: calc(100dvh - var(--topbar)); }
  .stage { position: absolute; inset: 0; }
  .stage__ambient { min-width: 430px; min-height: 430px; }
  .stage__status { top: 12px; right: 12px; font-size: 10px; }
  .stage__hint { left: 12px; bottom: calc(44dvh + 14px); }
  .browser-panel { position: absolute; z-index: 15; left: 0; right: 0; bottom: 0; height: 43dvh; min-height: 320px; max-height: calc(100dvh - 88px); border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.4); transition: height .25s ease; }
  .browser-panel.is-expanded { height: calc(100dvh - 76px); }
  .panel-handle { display: block; width: 39px; height: 4px; flex: none; margin: 8px auto 0; border-radius: 99px; background: #444d59; }
  .panel-header { min-height: 83px; padding: 11px 14px 10px; align-items: center; }
  .panel-header__back { margin-top: 0; }
  .eyebrow { margin-bottom: 5px; font-size: 8px; }
  .panel-header h1 { font-size: 17px; }
  .panel-header__copy > p:last-child { margin-top: 4px; font-size: 10px; }
  .panel-header__time { margin-top: 9px; font-size: 9px; }
  .panel-toolbar { padding: 8px 9px; }
  .filter-chip { height: 28px; }
  .directory-item { min-height: 55px; }
  .item-flag, .item-logo, .item-radio-mark { width: 35px; height: 35px; border-radius: 10px; }
  .player__frame { max-height: 33dvh; }
  .now-playing { min-height: 56px; }
  .content-dialog { border-radius: 18px; }
  .dialog__body { padding: 20px 19px 28px; font-size: 12px; }
}

@media (max-width: 410px) {
  .brand img { width: 123px; }
  .topbar .icon-button { width: 38px; height: 40px; }
  .mode-switch__button { width: 34px; height: 35px; }
  .stage__status span:last-child { display: none; }
  .stage__status { padding: 10px; }
  .panel-header__copy > p:last-child { max-width: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


.back-website {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  font-size:14px;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  background:rgba(255,255,255,.06);
}
.back-website:hover {background:rgba(255,255,255,.12);}
@media(max-width:700px){.back-website{font-size:12px;padding:8px 10px}.mode-switch{display:none}}
