* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-width: 0; height: 100%; background: #080a0f; color: #f6f7fb; font-family: Arial, Helvetica, sans-serif; }
body { overflow: hidden; }
body.is-fullscreen { overflow: hidden; }
.shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: clamp(12px, 1.45vw, 22px); height: 100vh; padding: clamp(14px, 2vw, 28px); background: linear-gradient(135deg, #090b11 0%, #151925 54%, #280e10 100%); }
.player-panel, .search-panel { min-width: 0; }
.topbar { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-width: 0; height: clamp(42px, 5vw, 54px); }
.brand { flex: 0 1 auto; min-width: 0; font-size: clamp(24px, 2.45vw, 34px); font-weight: 800; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span { color: #ef2d24; }
.hint { flex: 0 1 auto; color: #b8c1d4; font-size: clamp(13px, 1.1vw, 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-frame { position: relative; height: calc(100vh - clamp(138px, 12.8vw, 184px)); min-height: 300px; background: #000; border: 2px solid rgba(255,255,255,.18); border-radius: 8px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-frame video { object-fit: contain; }
.player-frame.is-fullscreen { position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.player-frame.is-fullscreen video { width: 100vw; height: 100vh; }
.exit-fullscreen { display: none; position: absolute; top: 18px; left: 18px; z-index: 55; height: 46px; padding: 0 22px; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.72); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; }
.exit-fullscreen:focus { outline: none; border-color: #fff; background: #ef2d24; }
.player-frame.is-fullscreen .exit-fullscreen { display: block; }
.empty-player { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #cbd4e6; }
.empty-player strong { max-width: 90%; font-size: clamp(22px, 2.5vw, 34px); color: white; text-align: center; }
.empty-player span { max-width: 90%; font-size: clamp(14px, 1.35vw, 18px); text-align: center; }
.now { min-height: clamp(68px, 7vw, 86px); padding-top: clamp(10px, 1.2vw, 16px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px; min-width: 0; }
.now-info { min-width: 0; }
.now-info div { font-size: clamp(18px, 1.75vw, 24px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-info span { display: block; color: #aeb8cc; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.volume-controls { display: grid; grid-template-columns: 44px 58px 44px 108px; align-items: center; gap: 8px; padding-top: 1px; }
.volume-controls button { width: 44px; height: 42px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font-size: 24px; font-weight: 800; cursor: pointer; line-height: 1; }
.volume-controls button:focus { outline: none; border-color: #fff; background: #ef2d24; }
.volume-controls span { display: block; width: 58px; color: #fff; font-size: 15px; font-weight: 700; text-align: center; margin: 0; }
.volume-controls .fullscreen-btn { width: 108px; padding: 0 10px; font-size: 14px; line-height: 1.1; }
.search-panel { display: flex; flex-direction: column; gap: clamp(10px, 1.1vw, 14px); padding-top: clamp(4px, .75vw, 10px); min-width: 0; min-height: 0; overflow: hidden; }
.search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.search input, .search button { width: 100%; min-width: 0; height: clamp(46px, 4.5vw, 54px); border-radius: 8px; border: 1px solid rgba(255,255,255,.18); font-size: clamp(15px, 1.35vw, 18px); }
.search input { background: rgba(255,255,255,.08); color: #fff; padding: 0 16px; outline: none; }
.search input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(239,45,36,.35); }
.search button { padding: 0 10px; background: #ef2d24; color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { min-height: 24px; color: #c3ccdd; font-size: 15px; }
.results { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; display: flex; flex-direction: column; gap: 10px; }
.results::-webkit-scrollbar { width: 10px; }
.results::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 8px; }
.item { flex: 0 0 auto; display: grid; grid-template-columns: clamp(92px, 8.6vw, 124px) minmax(0, 1fr); gap: clamp(8px, .9vw, 12px); min-height: clamp(76px, 6.8vw, 88px); padding: 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.07); color: white; text-align: left; cursor: pointer; }
.item:focus, .item.selected { outline: none; border-color: #fff; background: #ef2d24; }
.item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: #111; }
.meta { min-width: 0; }
.title { font-size: clamp(14px, 1.25vw, 17px); font-weight: 700; line-height: 1.22; max-height: 2.45em; overflow: hidden; }
.sub { margin-top: 7px; color: #c5cee0; font-size: clamp(12px, 1vw, 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item:focus .sub, .item.selected .sub { color: rgba(255,255,255,.86); }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); overflow-y: auto; height: auto; min-height: 100vh; }
  body { overflow: auto; }
  .player-panel { position: sticky; top: 0; z-index: 8; background: linear-gradient(135deg, #090b11 0%, #151925 54%, #280e10 100%); padding-bottom: 10px; }
  .player-frame { height: 52vh; }
  .search-panel { min-height: 46vh; }
}
@media (max-width: 520px) {
  .topbar { align-items: flex-start; flex-direction: column; height: auto; gap: 4px; margin-bottom: 10px; }
  .hint { white-space: normal; }
  .now { grid-template-columns: minmax(0, 1fr); }
  .volume-controls { justify-content: start; }
  .search { grid-template-columns: minmax(0, 1fr); }
  .search input, .search button { height: 48px; }
  .item { grid-template-columns: 96px minmax(0, 1fr); }
}
