:root {
  --swh-bg: #070910;
  --swh-panel: rgba(13, 18, 27, .86);
  --swh-panel-2: rgba(16, 24, 35, .82);
  --swh-line: rgba(151, 187, 215, .2);
  --swh-text: #eef6ff;
  --swh-muted: #8c9aab;
  --swh-cyan: #5ce7ef;
  --swh-pink: #ff62bd;
  --swh-yellow: #ffd65c;
  --swh-lime: #9ef57b;
  --swh-red: #ff5967;
}

body.search-watch-open { overflow: hidden; }

.search-watch-hub {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  color: var(--swh-text);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  letter-spacing: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.search-watch-hub.open { visibility: visible; opacity: 1; }
.swh-backdrop { position: absolute; inset: 0; background: rgba(1, 4, 10, .86); backdrop-filter: blur(16px) saturate(135%); }

.swh-window {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1500px, 100%);
  height: min(920px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(92, 231, 239, .28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 98, 189, .08), transparent 26%),
    linear-gradient(225deg, rgba(92, 231, 239, .09), transparent 28%),
    #070a10;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .72), 0 0 45px rgba(92, 231, 239, .08), inset 0 1px rgba(255, 255, 255, .04);
  transform: translateY(12px) scale(.992);
  transition: transform 200ms ease;
}

.swh-window::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--swh-pink), var(--swh-yellow), var(--swh-lime), var(--swh-cyan));
  content: "";
}

.search-watch-hub.open .swh-window { transform: none; }
.swh-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--swh-line); background: rgba(8, 13, 21, .9); backdrop-filter: blur(18px); }
.swh-brand, .swh-header-actions, .swh-brand > div, .swh-tabs button, .swh-panel-heading, .swh-now-playing, .swh-library-row section header, .swh-footer { display: flex; align-items: center; }
.swh-brand { gap: 13px; min-width: 0; }
.swh-brand > span { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid rgba(255,255,255,.68); border-radius: 8px; background: linear-gradient(135deg, #ff70c8, #65e7ef 56%, #fbe078); color: #061017; font-weight: 900; box-shadow: 0 0 26px rgba(92, 231, 239, .28), 0 0 35px rgba(255, 98, 189, .14); }
.swh-brand > div { align-items: flex-start; flex-direction: column; min-width: 0; }
.swh-brand small, .swh-panel-heading small { color: var(--swh-cyan); font-size: 10px; font-weight: 900; }
.swh-brand h2 { margin: 2px 0 0; overflow: hidden; color: var(--swh-text); font-size: clamp(16px, 2vw, 22px); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.swh-header-actions { gap: 8px; }
.swh-api-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; padding: 0 10px; border: 1px solid var(--swh-line); border-radius: 6px; background: rgba(15, 23, 33, .76); color: #8c9aaa; font-size: 9px; font-weight: 800; }
.swh-api-pill i, .swh-footer i { width: 7px; height: 7px; border-radius: 50%; background: #7b8793; box-shadow: 0 0 10px currentColor; }
.swh-api-pill.online { border-color: rgba(110, 238, 169, .35); color: #8ff0b9; }
.swh-api-pill.online i, .swh-footer i { background: #68e6a3; }
.swh-api-pill.offline { border-color: rgba(255, 112, 129, .32); color: #ff98a4; }
.swh-api-pill.offline i { background: #ff6475; }
.swh-api-pill.checking i { background: var(--swh-yellow); animation: swhPulse 1s ease infinite; }
.swh-icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--swh-line); border-radius: 7px; background: #121923; color: #dce6ef; font: 400 27px/1 system-ui; cursor: pointer; transition: 150ms ease; }
.swh-icon-button:hover { border-color: var(--swh-pink); color: #fff; background: #271426; box-shadow: 0 0 22px rgba(255, 98, 189, .18); transform: scale(1.04); }

.swh-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--swh-line); background: rgba(7, 11, 18, .86); }
.swh-tabs button { position: relative; justify-content: center; gap: 11px; min-height: 66px; border: 0; background: transparent; color: var(--swh-muted); cursor: pointer; transition: color 150ms ease, background 150ms ease; }
.swh-tabs button::after { position: absolute; right: 18%; bottom: 0; left: 18%; height: 3px; border-radius: 3px 3px 0 0; background: transparent; content: ""; transition: 180ms ease; }
.swh-tabs button:hover { color: #d8e5ef; background: rgba(255,255,255,.025); }
.swh-tabs button > b { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.05); border-radius: 7px; background: #171e28; color: #b9c3ce; font-size: 14px; }
.swh-tabs button > span { display: flex; align-items: flex-start; flex-direction: column; font-size: 14px; font-weight: 900; }
.swh-tabs button small { margin-top: 2px; color: #69798a; font-size: 10px; font-weight: 600; }
.swh-tabs button.active { color: #f4fbff; }
.swh-tabs button.active::after { background: linear-gradient(90deg, var(--swh-pink), var(--swh-cyan)); box-shadow: 0 0 18px var(--swh-cyan); }
.swh-tabs button[data-swh-tab="youtube"].active::after { background: linear-gradient(90deg, var(--swh-red), var(--swh-yellow)); box-shadow: 0 0 18px var(--swh-red); }
.swh-tabs button.active > b { background: linear-gradient(135deg, var(--swh-cyan), var(--swh-lime)); color: #061116; box-shadow: 0 0 20px rgba(92, 231, 239, .25); }
.swh-tabs button[data-swh-tab="youtube"].active > b { background: linear-gradient(135deg, var(--swh-red), #ff9869); color: #fff; box-shadow: 0 0 20px rgba(255, 89, 103, .25); }

.swh-body { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 0; }
.swh-sidebar { min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 18px 14px; border-right: 1px solid var(--swh-line); background: rgba(8, 13, 20, .82); scrollbar-width: thin; }
.swh-sidebar section + section { margin-top: 24px; }
.swh-sidebar section > small { display: block; margin: 0 8px 9px; color: #647487; font-size: 9px; font-weight: 900; }
.swh-sidebar a, .swh-history button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: #a9b4c0; font: 700 11px/1.3 inherit; text-align: left; text-decoration: none; cursor: pointer; transition: 150ms ease; }
.swh-sidebar a:hover, .swh-history button:hover { background: linear-gradient(90deg, rgba(92,231,239,.11), rgba(255,98,189,.05)); color: #fff; transform: translateX(2px); }
.swh-sidebar a b, .swh-history button b { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border: 1px solid #2b3b49; border-radius: 5px; color: var(--swh-cyan); font-size: 10px; }
.swh-sidebar a > i { margin-left: auto; color: #566575; font-style: normal; }
.swh-history button span, .swh-sidebar a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swh-history p { margin: 8px; color: #627180; font-size: 10px; }
.swh-clear { margin: 8px; padding: 0; border: 0; background: transparent; color: #71808f; font: 700 10px inherit; cursor: pointer; }
.swh-clear:hover { color: var(--swh-pink); }
.swh-privacy { padding: 13px; border: 1px solid rgba(92, 231, 239, .18); border-radius: 7px; background: linear-gradient(145deg, rgba(92,231,239,.07), rgba(255,98,189,.04)); }
.swh-privacy b { color: #d8e7f2; font-size: 10px; }
.swh-privacy p { margin: 5px 0 0; color: #778696; font-size: 9px; line-height: 1.6; }
.swh-privacy button { width: 100%; min-height: 32px; margin-top: 10px; border: 1px solid rgba(92,231,239,.35); border-radius: 5px; background: rgba(92,231,239,.09); color: var(--swh-cyan); font: 900 9px inherit; cursor: pointer; }
.swh-privacy button[aria-pressed="false"] { border-color: rgba(255,214,92,.3); background: rgba(255,214,92,.06); color: var(--swh-yellow); }

.swh-main { min-width: 0; min-height: 0; overflow: hidden; background: rgba(5, 8, 13, .7); }
.swh-panel { display: none; height: 100%; overflow: auto; padding: 22px; scrollbar-width: thin; scrollbar-color: #30404e #0a0e14; }
.swh-panel.active { display: block; animation: swhEnter 200ms ease both; }
.swh-panel-heading { justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.swh-panel-heading > div:first-child { min-width: 0; }
.swh-panel-heading h3 { margin: 3px 0 0; color: var(--swh-text); font-size: clamp(18px, 2vw, 26px); line-height: 1.25; }
.swh-panel-heading p { margin: 5px 0 0; color: #718092; font-size: 10px; }
.swh-segment { display: inline-flex; flex: 0 0 auto; padding: 3px; border: 1px solid var(--swh-line); border-radius: 7px; background: #0b1118; }
.swh-segment button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 5px; background: transparent; color: #81909e; font: 800 11px inherit; cursor: pointer; }
.swh-segment button.active { background: linear-gradient(135deg, #203643, #24223b); color: var(--swh-cyan); box-shadow: inset 0 0 0 1px rgba(92,231,239,.12); }

.swh-filterbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; overflow: auto hidden; }
.swh-filterbar label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; flex: 0 0 auto; padding: 0 8px 0 11px; border: 1px solid rgba(143,174,200,.18); border-radius: 6px; background: rgba(14, 21, 31, .82); color: #6f8091; font-size: 9px; font-weight: 800; }
.swh-filterbar select, .swh-filterbar input { min-width: 95px; height: 29px; border: 0; outline: 0; background: transparent; color: #c4d1dc; font: 700 10px inherit; }
.swh-filterbar input { width: 126px; }
.swh-filterbar input::placeholder { color: #617180; }
.swh-filterbar select option { background: #101722; }
.swh-toggle input { position: absolute; opacity: 0; }
.swh-toggle span { position: relative; width: 28px; height: 16px; border-radius: 9px; background: #27323d; transition: 150ms ease; }
.swh-toggle span::after { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #80909e; content: ""; transition: 150ms ease; }
.swh-toggle input:checked + span { background: linear-gradient(90deg, #3a99a5, #6acb8e); }
.swh-toggle input:checked + span::after { left: 15px; background: #fff; }

.swh-search-form { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px auto; align-items: center; min-height: 58px; overflow: hidden; border: 1px solid #344653; border-radius: 8px; background: rgba(11, 18, 27, .92); box-shadow: 0 12px 35px rgba(0, 0, 0, .23), inset 0 1px rgba(255,255,255,.025); transition: 150ms ease; }
.swh-search-form:focus-within { border-color: var(--swh-cyan); box-shadow: 0 0 0 3px rgba(92, 231, 239, .1), 0 14px 38px rgba(0,0,0,.28); }
.swh-search-form > span { display: grid; place-items: center; width: 44px; color: var(--swh-cyan); font-size: 16px; font-weight: 900; }
.swh-search-form input { min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; color: #edf6fb; font: 600 13px inherit; }
.swh-search-form input::placeholder { color: #607081; }
.swh-search-form button { align-self: stretch; border: 0; color: #91a4b3; font: 900 11px inherit; cursor: pointer; }
.swh-search-form .swh-voice { background: transparent; font-size: 15px; }
.swh-search-form .swh-voice:hover, .swh-search-form .swh-voice.listening { color: var(--swh-pink); text-shadow: 0 0 14px var(--swh-pink); }
.swh-search-form .swh-voice.listening { animation: swhPulse .8s ease infinite; }
.swh-search-form .swh-submit { min-width: 118px; border-left: 1px solid #334653; background: linear-gradient(135deg, #183541, #213047); color: #91edf4; }
.swh-search-form .swh-submit:hover { background: linear-gradient(135deg, var(--swh-cyan), var(--swh-lime)); color: #061116; }
.swh-search-form button:disabled { cursor: progress; opacity: .65; }
.swh-search-form--youtube:focus-within { border-color: var(--swh-red); box-shadow: 0 0 0 3px rgba(255, 89, 103, .1); }
.swh-search-form--youtube > span { color: var(--swh-red); }
.swh-search-form--youtube .swh-submit { background: linear-gradient(135deg, #3b1920, #382134); color: #ffadb5; }
.swh-search-form--youtube .swh-submit:hover { background: linear-gradient(135deg, var(--swh-red), #ff9c62); color: #fff; }
.swh-youtube-tools { display: flex; align-items: center; gap: 7px; margin-top: 10px; overflow: auto hidden; padding-bottom: 2px; scrollbar-width: thin; }
.swh-youtube-tools button { min-height: 34px; flex: 0 0 auto; padding: 0 11px; border: 1px solid rgba(143,174,200,.22); border-radius: 6px; background: linear-gradient(145deg, #111923, #171522); color: #9aa9b5; font: 800 9px inherit; cursor: pointer; }
.swh-youtube-tools button:hover, .swh-youtube-tools button.active, .swh-youtube-tools button[aria-pressed="true"] { border-color: var(--swh-red); color: #ffabb3; box-shadow: inset 0 0 18px rgba(255,89,103,.06); }
.swh-youtube-tools > span { margin-left: auto; flex: 0 0 auto; padding: 6px 9px; border-radius: 5px; background: rgba(92,231,239,.07); color: var(--swh-cyan); font-size: 8px; font-weight: 900; }

.swh-query-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 46px; color: #788796; font-size: 10px; }
.swh-query-meta div { display: flex; gap: 6px; }
.swh-query-meta button { min-height: 30px; padding: 0 10px; border: 1px solid var(--swh-line); border-radius: 5px; background: #101721; color: #afbac5; font: 700 10px inherit; cursor: pointer; }
.swh-query-meta button:hover:not(:disabled) { border-color: var(--swh-cyan); color: var(--swh-cyan); }
.swh-query-meta button:disabled { opacity: .35; cursor: not-allowed; }
.swh-results { display: grid; gap: 10px; }
.swh-empty { display: grid; place-items: center; min-height: 290px; padding: 35px; border: 1px dashed rgba(110,151,180,.3); border-radius: 8px; background: linear-gradient(145deg, rgba(92,231,239,.025), rgba(255,98,189,.025)); color: #71808e; text-align: center; }
.swh-empty b { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(92,231,239,.3); border-radius: 8px; background: linear-gradient(145deg, #101923, #181626); color: var(--swh-cyan); font-size: 23px; box-shadow: 0 0 28px rgba(92,231,239,.08); }
.swh-empty h4 { margin: 17px 0 6px; color: #cbd7e1; font-size: 16px; }
.swh-empty p { max-width: 470px; margin: 0; font-size: 11px; line-height: 1.65; }
.swh-empty-chips { display: flex; gap: 6px; margin-top: 15px; }
.swh-empty-chips span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; background: rgba(255,255,255,.035); color: #8998a6; font-size: 8px; font-weight: 800; }

.swh-google-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 15px; border: 1px solid rgba(120,154,180,.17); border-radius: 8px; background: linear-gradient(130deg, rgba(13, 19, 28, .94), rgba(15, 19, 31, .86)); transition: border-color 150ms ease, transform 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.swh-google-result:hover { border-color: rgba(92,231,239,.4); background: linear-gradient(130deg, rgba(14, 27, 35, .96), rgba(24, 19, 35, .9)); box-shadow: 0 12px 28px rgba(0,0,0,.18), inset 3px 0 var(--swh-cyan); transform: translateY(-1px); }
.swh-google-result img { width: 82px; height: 82px; border-radius: 7px; object-fit: cover; background: #101721; }
.swh-google-result small, .swh-image-result small { color: #67d5df; font-size: 9px; }
.swh-google-result a, .swh-image-result a { display: block; margin: 4px 0; color: #e3edf5; font-size: 13px; font-weight: 800; line-height: 1.4; text-decoration: none; }
.swh-google-result a:hover, .swh-image-result a:hover { color: var(--swh-cyan); text-decoration: underline; }
.swh-google-result p, .swh-image-result p { margin: 0; color: #8694a2; font-size: 10px; line-height: 1.55; }
.swh-result-actions { display: flex; gap: 6px; margin-top: 9px; }
.swh-result-actions button { min-height: 27px; padding: 0 9px; border: 1px solid rgba(143,174,200,.2); border-radius: 5px; background: rgba(255,255,255,.025); color: #8695a3; font: 800 8px inherit; cursor: pointer; }
.swh-result-actions button:hover, .swh-result-actions button.active { border-color: var(--swh-yellow); color: var(--swh-yellow); background: rgba(255,214,92,.06); }
.swh-results.swh-image-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.swh-results.swh-image-grid .swh-correction { grid-column: 1 / -1; }
.swh-image-result { overflow: hidden; border: 1px solid rgba(120,154,180,.19); border-radius: 8px; background: #0d131b; transition: 160ms ease; }
.swh-image-result:hover { border-color: var(--swh-pink); box-shadow: 0 12px 28px rgba(0,0,0,.24), 0 0 20px rgba(255,98,189,.06); transform: translateY(-2px); }
.swh-image-result > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #121922; }
.swh-image-result > div { padding: 11px; }
.swh-image-result a { display: -webkit-box; overflow: hidden; font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.swh-image-result p { display: none; }
.swh-correction { justify-self: start; padding: 7px 11px; border: 1px solid rgba(255,214,92,.28); border-radius: 5px; background: rgba(255,214,92,.06); color: var(--swh-yellow); font: 800 10px inherit; cursor: pointer; }

.swh-service-error { grid-column: 1 / -1; margin-top: 8px; padding: 24px; border: 1px solid rgba(255,188,84,.35); border-radius: 8px; background: linear-gradient(135deg, rgba(83,53,22,.26), rgba(52,25,46,.18)); }
.swh-service-error h4 { margin: 0 0 8px; color: #f7d47b; font-size: 16px; }
.swh-service-error p { max-width: 760px; margin: 0; color: #c1b3a4; font-size: 11px; line-height: 1.7; }
.swh-service-error > div { display: flex; gap: 8px; margin-top: 15px; }
.swh-service-error button, .swh-service-error a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #826343; border-radius: 6px; background: #282018; color: #f0cb80; font: 800 10px inherit; text-decoration: none; cursor: pointer; }
.swh-results.swh-free-google-results { display: block; }
.swh-google-free-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 12px; padding: 13px 15px; border: 1px solid rgba(104, 230, 163, .35); border-radius: 8px; background: linear-gradient(110deg, rgba(39, 113, 91, .22), rgba(33, 93, 116, .17), rgba(83, 45, 95, .17)); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 10px 30px rgba(0,0,0,.16); }
.swh-google-free-banner div { display: grid; gap: 3px; }
.swh-google-free-banner b { color: #9df1be; font-size: 12px; }
.swh-google-free-banner span { color: #9cabb9; font-size: 10px; }
.swh-google-free-banner a { display: inline-flex; align-items: center; min-height: 34px; flex: 0 0 auto; padding: 0 12px; border: 1px solid rgba(92, 231, 239, .35); border-radius: 6px; background: rgba(14, 27, 38, .85); color: var(--swh-cyan); font-size: 10px; font-weight: 800; text-decoration: none; }
.swh-google-cse-host { width: 100%; min-width: 0; min-height: 300px; overflow-x: hidden; overflow-y: auto; padding: 10px; border: 1px solid rgba(151, 187, 215, .24); border-radius: 8px; background: #fff; color: #202124; color-scheme: light; }
.swh-google-cse-host .gsc-control-cse { width: 100%; min-width: 0; padding: 0; border: 0; font-family: Arial, sans-serif; }
.swh-google-cse-host .gsc-results-wrapper-overlay { position: static !important; inset: auto !important; width: 100% !important; height: auto !important; min-height: 260px; margin: 0 !important; overflow: visible !important; border: 0 !important; box-shadow: none !important; opacity: 1 !important; visibility: visible !important; }
.swh-google-cse-host .gsc-results-close-btn, .search-watch-hub .gsc-modal-background-image { display: none !important; }
.swh-google-cse-host .gsc-webResult, .swh-google-cse-host .gsc-imageResult, .swh-google-cse-host .gsc-results { width: 100% !important; max-width: 100% !important; }

.swh-player-shell { margin: 18px 0; overflow: hidden; border: 1px solid rgba(255, 89, 103, .35); border-radius: 8px; background: #090d13; box-shadow: 0 18px 45px rgba(0,0,0,.3), 0 0 25px rgba(255,89,103,.05); }
.swh-player { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.swh-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.swh-player-controls { display: flex; align-items: center; gap: 6px; min-height: 45px; padding: 7px 12px; border-top: 1px solid rgba(255,255,255,.04); border-bottom: 1px solid var(--swh-line); background: linear-gradient(90deg, #0c121a, #16131d); }
.swh-player-controls button { display: grid; place-items: center; width: 32px; height: 30px; border: 1px solid #34424e; border-radius: 5px; background: #111923; color: #b7c3cd; font: 800 10px inherit; cursor: pointer; }
.swh-player-controls button:hover { border-color: var(--swh-red); color: #ff9da6; }
.swh-player-controls label { display: inline-flex; align-items: center; gap: 6px; margin-left: 5px; color: #778797; font-size: 8px; font-weight: 800; }
.swh-player-controls select { height: 28px; border: 1px solid #34424e; border-radius: 5px; outline: 0; background: #101720; color: #c3ced7; font: 800 9px inherit; }
.swh-player-controls > span { margin-left: auto; color: #66d6df; font-size: 8px; font-weight: 800; }
.swh-player-shell.swh-mini-player { position: sticky; z-index: 8; top: 0; width: min(520px, 52vw); margin-left: auto; box-shadow: 0 24px 70px rgba(0,0,0,.58), 0 0 0 1px rgba(255,89,103,.25); }
.swh-player-shell.swh-mini-player .swh-now-playing { display: none; }
.swh-now-playing { justify-content: space-between; gap: 18px; padding: 13px 15px; }
.swh-now-playing > div:first-child { min-width: 0; }
.swh-now-playing > div:last-child { display: flex; flex: 0 0 auto; gap: 6px; }
.swh-now-playing small { color: var(--swh-red); font-size: 8px; font-weight: 900; }
.swh-now-playing h4 { margin: 2px 0; overflow: hidden; color: #e8f1f7; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.swh-now-playing p { margin: 0; color: #81909e; font-size: 10px; }
.swh-now-playing button { min-height: 34px; flex: 0 0 auto; padding: 0 11px; border: 1px solid #43515e; border-radius: 5px; background: #131b24; color: #b9c4ce; font: 800 9px inherit; cursor: pointer; }
.swh-now-playing button:hover { border-color: var(--swh-cyan); color: var(--swh-cyan); }
.swh-now-playing button.active { border-color: var(--swh-yellow); color: var(--swh-yellow); background: #221e12; }

.swh-library-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.swh-library-row section { min-width: 0; padding: 12px; border: 1px solid rgba(120,154,180,.16); border-radius: 7px; background: rgba(12, 18, 25, .78); }
.swh-library-row section header { justify-content: space-between; margin-bottom: 9px; color: #b9c5cf; font-size: 10px; }
.swh-library-row section header button { border: 0; background: transparent; color: #6f7e8b; font: 700 9px inherit; cursor: pointer; }
.swh-library-row section header span { color: #6f7e8b; font-size: 9px; }
.swh-library-row section > div { display: flex; gap: 7px; min-height: 54px; overflow: auto hidden; scrollbar-width: thin; }
.swh-library-row section > div > small { align-self: center; color: #61707e; font-size: 9px; }
.swh-library-row section > div > button { position: relative; width: 94px; height: 54px; flex: 0 0 94px; overflow: hidden; padding: 0; border: 1px solid #2a3743; border-radius: 5px; background: #111821; cursor: pointer; }
.swh-library-row img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.swh-library-row button span { position: absolute; inset: auto 0 0; overflow: hidden; padding: 14px 5px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .92)); color: #fff; font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.swh-video-results { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 8px; }
.swh-video-results > .swh-empty, .swh-video-results > .swh-service-error { grid-column: 1 / -1; }
.swh-video-card { min-width: 0; overflow: hidden; border: 1px solid rgba(120,154,180,.18); border-radius: 8px; outline: 0; background: linear-gradient(145deg, #0d131b, #11131d); cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.swh-video-card:hover, .swh-video-card:focus-visible { border-color: rgba(255,89,103,.55); box-shadow: 0 14px 32px rgba(0, 0, 0, .28), 0 0 22px rgba(255,89,103,.06); transform: translateY(-3px); }
.swh-video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111821; }
.swh-video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.swh-video-card:hover .swh-video-thumb img { transform: scale(1.035); }
.swh-video-thumb > span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 34px; border-radius: 7px; background: rgba(255, 46, 62, .94); color: #fff; font-size: 14px; transform: translate(-50%, -50%); box-shadow: 0 8px 20px rgba(0, 0, 0, .38); }
.swh-video-thumb time { position: absolute; right: 7px; bottom: 6px; padding: 3px 5px; border-radius: 4px; background: rgba(0,0,0,.82); color: #fff; font-size: 8px; font-weight: 800; }
.swh-video-card > div:last-child { position: relative; padding: 12px; }
.swh-video-card h4 { display: -webkit-box; min-height: 38px; margin: 0 0 5px; overflow: hidden; color: #e0e9f0; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.swh-video-card p { margin: 0 0 7px; overflow: hidden; color: #8493a1; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.swh-video-actions { display: flex; gap: 6px; margin-top: 8px; }
.swh-video-card button { min-width: 36px; height: 28px; padding: 0 7px; border: 1px solid #34424e; border-radius: 5px; background: #121a23; color: #9ba8b3; font: 800 8px inherit; cursor: pointer; }
.swh-video-card button:hover, .swh-video-card button.active { border-color: var(--swh-yellow); color: var(--swh-yellow); }
.swh-video-badges { display: flex; gap: 5px; min-height: 17px; }
.swh-video-badges span { padding: 2px 5px; border: 1px solid rgba(92,231,239,.22); border-radius: 4px; background: rgba(92,231,239,.05); color: #67d9e2; font-size: 7px; font-weight: 900; }

.swh-queue { margin: 15px 0; overflow: hidden; border: 1px solid rgba(120,154,180,.18); border-radius: 8px; background: linear-gradient(145deg, rgba(12,18,25,.92), rgba(22,15,28,.82)); }
.swh-queue > header { justify-content: space-between; gap: 12px; min-height: 52px; padding: 9px 12px; border-bottom: 1px solid var(--swh-line); }
.swh-queue > header small { display: block; color: var(--swh-red); font-size: 7px; font-weight: 900; }
.swh-queue > header b { color: #cbd6df; font-size: 10px; }
.swh-queue > header button { min-height: 30px; border: 1px solid #394854; border-radius: 5px; background: #111923; color: #8797a4; font: 800 8px inherit; cursor: pointer; }
.swh-queue > div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--swh-line); }
.swh-queue > div > p { grid-column: 1 / -1; margin: 0; padding: 18px; background: #0c1219; color: #657583; font-size: 9px; text-align: center; }
.swh-queue article { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 8px; background: #0c1219; }
.swh-queue article.active { background: linear-gradient(90deg, rgba(255,89,103,.11), rgba(92,231,239,.04)); box-shadow: inset 3px 0 var(--swh-red); }
.swh-queue article img { width: 72px; aspect-ratio: 16/9; border-radius: 4px; object-fit: cover; }
.swh-queue article > button { min-width: 0; padding: 0; border: 0; background: transparent; color: #a8b5bf; text-align: left; cursor: pointer; }
.swh-queue article > button small { display: block; overflow: hidden; color: #637483; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.swh-queue article > button b { display: block; overflow: hidden; margin-top: 3px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.swh-queue article > button.swh-queue-remove { width: 27px; height: 27px; border: 1px solid #33414d; border-radius: 5px; color: #758593; text-align: center; }
.swh-queue article > button.swh-queue-remove:hover { border-color: var(--swh-red); color: var(--swh-red); }
.swh-queue-controls { display: flex; gap: 3px; }
.swh-queue-controls button { display: grid; place-items: center; width: 24px; height: 25px; padding: 0; border: 1px solid #33414d; border-radius: 4px; background: #101821; color: #778795; font: 800 9px inherit; cursor: pointer; }
.swh-queue-controls button:hover:not(:disabled) { border-color: var(--swh-cyan); color: var(--swh-cyan); }
.swh-queue-controls button:last-child:hover { border-color: var(--swh-red); color: var(--swh-red); }
.swh-queue-controls button:disabled { opacity: .25; cursor: not-allowed; }

.swh-floating-player {
  position: fixed;
  z-index: 12500;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  width: min(480px, calc(100vw - 28px));
  min-width: 320px;
  min-height: 240px;
  max-width: calc(100vw - 12px);
  max-height: calc(100dvh - 12px);
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(255, 89, 103, .48);
  border-radius: 8px;
  background: #080c12;
  box-shadow: 0 28px 80px rgba(0,0,0,.68), 0 0 35px rgba(255,89,103,.12), 0 0 0 1px rgba(92,231,239,.08);
}
.swh-floating-player[hidden] { display: none; }
.swh-floating-player > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 7px 0 11px; border-bottom: 1px solid #283643; background: linear-gradient(90deg, #111923, #211421); cursor: move; user-select: none; touch-action: none; }
.swh-floating-player > header > div { display: inline-flex; align-items: center; gap: 7px; color: #c7d3dc; font-size: 8px; font-weight: 900; }
.swh-floating-player > header i { width: 7px; height: 7px; border-radius: 50%; background: #ff6675; box-shadow: 0 0 10px #ff6675; }
.swh-floating-player > header nav { display: flex; gap: 4px; }
.swh-floating-player > header button { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #354452; border-radius: 4px; background: #111923; color: #9eacb8; font: 800 11px inherit; cursor: pointer; }
.swh-floating-player > header button:hover { border-color: var(--swh-cyan); color: var(--swh-cyan); }
.swh-floating-player > header button:last-child:hover { border-color: var(--swh-red); color: var(--swh-red); }
.swh-floating-player > [data-floating-slot] { min-height: 0; overflow: auto; background: #080c12; }
.swh-floating-player .swh-player-shell { display: grid; grid-template-rows: auto auto auto; height: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.swh-floating-player .swh-player { min-height: 180px; }
.swh-floating-player .swh-now-playing { padding: 9px 11px; }
.swh-floating-player .swh-now-playing h4 { max-width: 245px; }
.swh-floating-player.is-minimized { width: 310px !important; min-width: 310px; height: 38px !important; min-height: 38px; resize: none; }
.swh-floating-player.is-minimized > [data-floating-slot] { display: none; }
.search-watch-hub.swh-focus .swh-body { grid-template-columns: minmax(0,1fr); }
.search-watch-hub.swh-focus .swh-sidebar { display: none; }
.search-watch-hub.swh-focus .swh-panel-heading, .search-watch-hub.swh-focus .swh-filterbar--youtube, .search-watch-hub.swh-focus .swh-search-form--youtube { display: none; }
.search-watch-hub.swh-focus .swh-player-shell { max-width: 1180px; margin-right: auto; margin-left: auto; }

.swh-skeleton { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 13px; min-height: 112px; padding: 15px; border: 1px solid rgba(120,154,180,.12); border-radius: 8px; background: #0c1219; }
.swh-skeleton i, .swh-skeleton b { display: block; border-radius: 5px; background: linear-gradient(90deg, #141c26, #23303c, #141c26); background-size: 220% 100%; animation: swhSkeleton 1.2s linear infinite; }
.swh-skeleton i { width: 82px; height: 82px; }
.swh-skeleton span { display: grid; align-content: center; gap: 9px; }
.swh-skeleton b { height: 10px; }
.swh-skeleton b:nth-child(1) { width: 72%; }
.swh-skeleton b:nth-child(2) { width: 94%; }
.swh-skeleton b:nth-child(3) { width: 58%; }
.swh-video-results .swh-skeleton--video { display: block; min-height: 230px; padding: 0; overflow: hidden; }
.swh-skeleton--video i { width: 100%; height: 150px; border-radius: 0; }
.swh-skeleton--video span { padding: 15px; }

.swh-footer { justify-content: space-between; gap: 15px; min-height: 42px; padding: 8px 17px; border-top: 1px solid var(--swh-line); background: rgba(7, 12, 19, .94); color: #677684; font-size: 8px; }
.swh-footer > span { display: inline-flex; align-items: center; gap: 7px; color: #8a9aa7; font-weight: 800; }
.swh-footer p { margin: 0; text-align: center; }
.swh-footer > div { display: flex; gap: 5px; }
.swh-footer kbd { padding: 3px 6px; border: 1px solid #34414c; border-radius: 4px; background: #121820; color: #84919d; font: 700 8px inherit; }
.swh-inline-launcher { white-space: nowrap; }

@keyframes swhEnter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes swhPulse { 50% { opacity: .45; transform: scale(.82); } }
@keyframes swhSkeleton { to { background-position: -220% 0; } }

@media (max-width: 1050px) {
  .swh-results.swh-image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swh-video-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swh-api-pill { padding: 0 7px; font-size: 0; }
  .swh-api-pill i { margin: 0; }
}

@media (max-width: 760px) {
  .search-watch-hub { padding: 0; }
  .swh-window { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .swh-header { min-height: 62px; padding: 9px 12px; }
  .swh-brand > span { width: 38px; height: 38px; flex-basis: 38px; }
  .swh-brand h2 { font-size: 13px; }
  .swh-tabs button { min-height: 54px; }
  .swh-tabs button small, .swh-sidebar, .swh-footer p { display: none; }
  .swh-body { grid-template-columns: minmax(0, 1fr); }
  .swh-panel { padding: 14px; }
  .swh-panel-heading { align-items: flex-start; flex-direction: column; }
  .swh-panel-heading h3 { font-size: 18px; }
  .swh-search-form { grid-template-columns: 38px minmax(0, 1fr) 38px; }
  .swh-search-form > span { width: 38px; }
  .swh-search-form .swh-submit { grid-column: 1 / -1; min-height: 42px; border-top: 1px solid #334653; border-left: 0; }
  .swh-results.swh-image-grid, .swh-video-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swh-library-row { grid-template-columns: minmax(0, 1fr); }
  .swh-queue > div { grid-template-columns: minmax(0,1fr); }
  .swh-now-playing { align-items: flex-start; flex-direction: column; }
  .swh-now-playing > div:last-child { width: 100%; flex-wrap: wrap; }
  .swh-now-playing button { flex: 1; }
  .swh-player-controls { flex-wrap: wrap; }
  .swh-player-controls > span { width: 100%; margin: 2px 0 0; }
  .swh-player-shell.swh-mini-player { width: 100%; }
  .swh-footer { min-height: 34px; }
  .swh-floating-player { right: 7px; bottom: 7px; min-width: 280px; width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
  .swh-floating-player .swh-now-playing > div:last-child { display: none; }
}

@media (max-width: 480px) {
  .swh-api-pill { display: none; }
  .swh-tabs button > span { font-size: 11px; }
  .swh-tabs button > b { width: 28px; height: 28px; }
  .swh-panel { padding: 11px; }
  .swh-segment { width: 100%; }
  .swh-segment button { flex: 1; }
  .swh-results.swh-image-grid, .swh-video-results { grid-template-columns: minmax(0, 1fr); }
  .swh-google-result { grid-template-columns: minmax(0, 1fr); }
  .swh-google-result img { width: 100%; height: 150px; }
  .swh-service-error > div { align-items: stretch; flex-direction: column; }
  .swh-google-free-banner { align-items: stretch; flex-direction: column; }
  .swh-google-free-banner a { justify-content: center; }
  .swh-filterbar label { min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .search-watch-hub, .swh-window, .swh-panel, .swh-google-result, .swh-image-result, .swh-video-card, .swh-video-thumb img, .swh-icon-button { animation: none !important; transition: none !important; }
}
