/* =========================================================
   RetroTube 2007-2008 "Broadcast Yourself" Authentic CSS
   Fixed 960px layout, Arial/Tahoma 12px, glossy Web 2.0 tabs
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

a {
  color: #0033cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

#page-wrap {
  width: 960px;
  margin: 0 auto;
  padding: 10px 0 40px 0;
}

/* ---------- TOP HEADER ---------- */
#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#logo-link {
  display: inline-block;
  text-decoration: none !important;
  line-height: 1;
}

.logo-you {
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 29px;
  color: #222222;
  letter-spacing: -1px;
}

.logo-tube {
  display: inline-block;
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #ffffff;
  background: linear-gradient(to bottom, #f0382e 0%, #d4150d 52%, #a80a05 100%);
  padding: 1px 6px 2px 5px;
  margin-left: 1px;
  border-radius: 6px;
  border: 1px solid #990803;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 1px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

.logo-tagline {
  display: block;
  font-size: 10px;
  color: #666666;
  font-weight: bold;
  letter-spacing: 0.2px;
  margin-top: 2px;
  padding-left: 2px;
}

.tm {
  font-size: 8px;
  vertical-align: super;
}

.noalgo-stamp {
  background: #ffffcc;
  border: 1px solid #d8cc55;
  color: #554400;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: -10px;
}

.top-right {
  font-size: 11px;
  color: #666666;
  padding-top: 4px;
}

.top-right .sep {
  color: #cccccc;
  margin: 0 5px;
}

.welcome-user {
  color: #333333;
}

.mcp-pill-link {
  font-weight: bold;
  color: #005500;
}

.mcp-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22aa22;
  margin-right: 4px;
  vertical-align: middle;
}

/* ---------- 2007 GLOSSY TAB BAR ---------- */
#nav-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-left: 6px;
  border-bottom: 1px solid #9ab3d5;
}

.nav-tab {
  display: inline-block;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: bold;
  color: #0033cc;
  background: linear-gradient(to bottom, #f4f8fd 0%, #dbe8f8 50%, #c6daf2 51%, #d4e4f7 100%);
  border: 1px solid #9ab3d5;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  text-decoration: none !important;
  position: relative;
  top: 1px;
}

.nav-tab:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #e6f0fc 50%, #d4e4f8 51%, #e0edfc 100%);
}

.nav-tab.active {
  color: #222222;
  background: linear-gradient(to bottom, #ffffff 0%, #eef4fc 100%);
  border-color: #9ab3d5;
  padding-bottom: 7px;
}

.nav-right-note {
  margin-left: auto;
  padding-bottom: 5px;
}

.mode-badge {
  font-size: 10px;
  color: #445566;
  background: #f0f4fa;
  border: 1px solid #c6d4e6;
  padding: 2px 7px;
  border-radius: 3px;
}

/* ---------- SEARCH STRIP ---------- */
#search-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #eef4fc 0%, #d7e4f5 100%);
  border: 1px solid #9ab3d5;
  border-top: none;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 0 0 4px 4px;
}

#search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

#search-input {
  width: 340px;
  padding: 4px 6px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  border: 1px solid #7f9db9;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

#search-scope {
  padding: 3px 5px;
  font-size: 11px;
  border: 1px solid #7f9db9;
  background: #ffffff;
}

.search-actions {
  font-size: 11px;
}

/* ---------- 2007 GLOSSY BUTTONS ---------- */
.yt-btn {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 12px;
  color: #333333;
  background: linear-gradient(to bottom, #ffffff 0%, #e4e4e4 50%, #d6d6d6 51%, #e8e8e8 100%);
  border: 1px solid #999999;
  border-radius: 3px;
  cursor: pointer;
}

.yt-btn:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 50%, #e0e0e0 51%, #f2f2f2 100%);
}

.yt-btn-blue {
  color: #003388;
  background: linear-gradient(to bottom, #ffffff 0%, #d9e7fa 50%, #c4daf5 51%, #d6e6fa 100%);
  border-color: #7d9ec9;
}

.yt-btn-yellow {
  color: #442200;
  background: linear-gradient(to bottom, #fff2a8 0%, #ffd24d 50%, #f5b800 51%, #ffd54f 100%);
  border-color: #cc9900;
}

.yt-btn-yellow:hover {
  background: linear-gradient(to bottom, #fff7c2 0%, #ffdb6b 50%, #ffc414 51%, #ffe075 100%);
}

.yt-btn-subscribed {
  color: #333333;
  background: linear-gradient(to bottom, #f5f5f5 0%, #dddddd 100%);
  border-color: #aaaaaa;
}

.yt-btn-mini {
  font-family: Arial, sans-serif;
  font-size: 11px;
  padding: 2px 7px;
  background: linear-gradient(to bottom, #ffffff 0%, #dcdcdc 100%);
  border: 1px solid #999999;
  border-radius: 2px;
  cursor: pointer;
}

/* ---------- BANNERS & LOADING ---------- */
#status-banner {
  background: #ffffcc;
  border: 1px solid #d6c94c;
  padding: 7px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #333333;
}

#status-banner.error {
  background: #ffecec;
  border-color: #cc3333;
  color: #990000;
}

.loading-box {
  border: 1px solid #cccccc;
  background: #f9f9f9;
  padding: 36px 20px;
  text-align: center;
  color: #555555;
  font-size: 13px;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #cccccc;
  border-top-color: #cc0000;
  border-radius: 50%;
  margin: 0 auto 10px auto;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- TWO-COLUMN CLASSIC LAYOUT ---------- */
.two-col {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.col-main {
  width: 650px;
  flex-shrink: 0;
}

.col-side {
  width: 296px;
  flex-shrink: 0;
}

/* ---------- CLASSIC 2007 MODULE BOXES ---------- */
.retro-box {
  border: 1px solid #cccccc;
  background: #ffffff;
  margin-bottom: 12px;
}

.retro-box-blue {
  border-color: #a6bddc;
}

.retro-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #f7f7f7 0%, #e6e6e6 100%);
  border-bottom: 1px solid #cccccc;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: bold;
  color: #333333;
}

.retro-box-blue .retro-box-header {
  background: linear-gradient(to bottom, #f2f7fd 0%, #dce8f8 100%);
  border-bottom-color: #a6bddc;
  color: #003366;
}

.retro-box-body {
  padding: 10px;
}

/* Yellow #noalgo Callout Box (Classic 2007 Login / Notice box style) */
.noalgo-box {
  background: #ffffcc;
  border: 1px solid #dfce5c;
  padding: 10px;
  margin-bottom: 12px;
}

.noalgo-box-title {
  font-size: 13px;
  font-weight: bold;
  color: #5c4900;
  margin: 0 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #e6da7c;
}

.noalgo-metrics {
  display: flex;
  justify-content: space-between;
  background: #fffef0;
  border: 1px solid #e6da7c;
  padding: 5px 8px;
  margin-bottom: 8px;
  font-size: 11px;
}

.noalgo-metric strong {
  display: block;
  font-size: 14px;
  color: #cc0000;
}

.noalgo-toggle {
  display: block;
  font-size: 11px;
  margin: 4px 0;
  cursor: pointer;
}

/* ---------- CHANNEL FILTER STRIP ---------- */
.channel-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 10px;
  background: #f5f8fc;
  border-bottom: 1px solid #dce5f2;
  font-size: 11px;
}

.filter-pill {
  padding: 2px 7px;
  border: 1px solid #c2d2e8;
  background: #ffffff;
  color: #0033cc;
  border-radius: 2px;
  cursor: pointer;
}

.filter-pill:hover {
  background: #eef4fc;
}

.filter-pill.active {
  background: #0033cc;
  color: #ffffff;
  border-color: #002288;
  font-weight: bold;
}

/* ---------- VIDEO GRID (4-UP 2007 CLASSIC) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
}

.video-card {
  width: 148px;
}

.thumb-frame {
  position: relative;
  display: block;
  width: 144px;
  height: 92px;
  padding: 2px;
  border: 1px solid #b5b5b5;
  background: #ffffff;
  margin-bottom: 4px;
}

.thumb-frame:hover {
  border-color: #0033cc;
}

.thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111111;
}

.thumb-duration {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
  font-family: Tahoma, Arial, sans-serif;
}

.thumb-wl-btn {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #777777;
  color: #222222;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 4px;
  cursor: pointer;
  display: none;
}

.thumb-frame:hover .thumb-wl-btn {
  display: inline-block;
}

.video-title {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #0033cc;
  line-height: 1.25;
  max-height: 30px;
  overflow: hidden;
  margin-bottom: 3px;
}

.video-meta {
  font-size: 11px;
  color: #666666;
  line-height: 1.35;
}

.video-meta .from-link {
  color: #0033cc;
}

/* ---------- VIDEO LIST VIEW ---------- */
.video-list-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted #cccccc;
}

.video-list-item:last-child {
  border-bottom: none;
}

.video-list-item .thumb-frame {
  flex-shrink: 0;
}

.video-list-desc {
  font-size: 11px;
  color: #444444;
  margin: 4px 0;
  max-height: 30px;
  overflow: hidden;
}

/* ---------- CLASSIC 5-STAR RATING ---------- */
.star-row {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  vertical-align: middle;
  margin: 2px 0;
}

.star-svg {
  width: 12px;
  height: 12px;
}

.star-svg.lg {
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.star-label {
  font-size: 10px;
  color: #666666;
  margin-left: 4px;
}

/* ---------- SIDEBAR SUBSCRIPTIONS & WATCH LATER ---------- */
.sub-add-form {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.sub-add-form input {
  flex: 1;
  padding: 4px 5px;
  font-size: 11px;
  border: 1px solid #999999;
}

.sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

.sub-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px;
  border-bottom: 1px dotted #e0e0e0;
  font-size: 11px;
}

.sub-list li:last-child {
  border-bottom: none;
}

.sub-remove {
  color: #999999;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
}

.sub-remove:hover {
  color: #cc0000;
  text-decoration: none;
}

.mini-video-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dotted #d5d5d5;
}

.mini-video-item:last-child {
  border-bottom: none;
}

.mini-thumb {
  width: 88px;
  height: 56px;
  padding: 2px;
  border: 1px solid #b5b5b5;
  background: #ffffff;
  flex-shrink: 0;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-info {
  font-size: 11px;
  overflow: hidden;
}

.mini-title {
  display: block;
  font-weight: bold;
  color: #0033cc;
  line-height: 1.2;
  max-height: 26px;
  overflow: hidden;
  margin-bottom: 2px;
}

/* ---------- WATCH PAGE (2007 CLASSIC) ---------- */
.watch-title {
  font-size: 19px;
  font-weight: bold;
  color: #111111;
  margin: 0 0 8px 0;
}

.watch-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.watch-left {
  width: 640px;
  flex-shrink: 0;
}

.watch-right {
  width: 306px;
  flex-shrink: 0;
}

.player-shell {
  background: #141414;
  border: 1px solid #333333;
  padding: 4px;
  box-shadow: inset 0 1px 0 #444444;
}

.player-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000000;
}

.player-frame-wrap.ratio-43 {
  padding-top: 75%;
}

.player-frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-chrome-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #3a3a3a 0%, #1d1d1d 100%);
  color: #cccccc;
  font-size: 10px;
  padding: 4px 8px;
  margin-top: 3px;
}

.player-chrome-bar a {
  color: #99ccff;
}

.watch-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eeeeee;
  border: 1px solid #cccccc;
  border-top: none;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.rate-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rate-caption {
  font-size: 11px;
  color: #444444;
}

.watch-btn-group {
  display: flex;
  gap: 6px;
}

.creator-info-box {
  background: #eeeeee;
  border: 1px solid #cccccc;
  padding: 10px;
  margin-bottom: 12px;
}

.creator-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d5d5d5;
}

.creator-name {
  font-size: 13px;
  font-weight: bold;
}

.creator-meta-line {
  font-size: 11px;
  color: #555555;
  margin: 3px 0;
}

.video-description {
  font-size: 11px;
  color: #333333;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 6px;
  max-height: 74px;
  overflow: hidden;
}

.video-description.expanded {
  max-height: none;
}

.share-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #d5d5d5;
  font-size: 11px;
}

.share-box input {
  width: 100%;
  font-family: monospace;
  font-size: 10px;
  padding: 3px 4px;
  border: 1px solid #aaaaaa;
  margin: 2px 0 6px 0;
  background: #ffffff;
}

/* Sidebar Tabs on Watch Page */
.side-tabs {
  display: flex;
  background: #e6e6e6;
  border-bottom: 1px solid #cccccc;
}

.side-tab {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: bold;
  color: #0033cc;
  cursor: pointer;
  border-right: 1px solid #cccccc;
}

.side-tab:last-child {
  border-right: none;
}

.side-tab.active {
  background: #ffffff;
  color: #222222;
}

.noalgo-sidebar-note {
  background: #ffffdd;
  border-bottom: 1px solid #e6dc85;
  padding: 5px 8px;
  font-size: 10px;
  color: #5c4900;
}

/* ---------- COMMENTS ---------- */
.comment-form {
  background: #f5f5f5;
  border: 1px solid #dddddd;
  padding: 8px;
  margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  font-family: Arial, sans-serif;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #aaaaaa;
  margin-bottom: 6px;
}

.comment-item {
  padding: 8px 0;
  border-bottom: 1px dotted #cccccc;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  font-size: 11px;
  margin-bottom: 3px;
}

.comment-author {
  font-weight: bold;
  color: #0033cc;
}

.comment-date {
  color: #777777;
  margin-left: 6px;
}

.comment-badge {
  font-size: 9px;
  background: #eef4fc;
  border: 1px solid #b8cce4;
  color: #335588;
  padding: 0 4px;
  margin-left: 6px;
}

.comment-body {
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- CHANNELS DIRECTORY ---------- */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.channel-card {
  border: 1px solid #cccccc;
  background: #fafafa;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-card-title {
  font-size: 13px;
  font-weight: bold;
}

.channel-card-sub {
  font-size: 11px;
  color: #666666;
  margin-top: 2px;
}

/* ---------- FOOTER ---------- */
#footer {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid #cccccc;
  text-align: center;
  font-size: 11px;
  color: #666666;
}

.footer-links {
  margin-bottom: 4px;
}

.footer-copy code {
  background: #f2f2f2;
  padding: 1px 4px;
  border: 1px solid #dddddd;
}

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  width: 460px;
  background: #ffffff;
  border: 2px solid #7d9ec9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #eef4fc 0%, #c8dcf5 100%);
  border-bottom: 1px solid #9ab3d5;
  padding: 7px 10px;
  font-weight: bold;
  font-size: 13px;
  color: #003366;
}

.modal-close {
  background: #ffffff;
  border: 1px solid #888888;
  cursor: pointer;
  font-weight: bold;
  padding: 0 6px;
}

.modal-body {
  padding: 12px;
}

.modal-intro {
  margin: 0 0 10px 0;
  font-size: 12px;
}

.setting-row {
  margin-bottom: 10px;
}

.setting-help {
  font-size: 11px;
  color: #666666;
  margin-top: 3px;
}

.retro-input-full {
  width: 100%;
  padding: 4px 6px;
  margin-top: 4px;
  border: 1px solid #888888;
  font-size: 12px;
}

.retro-hr {
  border: none;
  border-top: 1px solid #dddddd;
  margin: 10px 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
  background: #f2f2f2;
  border-top: 1px solid #cccccc;
}

/* ---------- 2007 FIREBUG-STYLE MCP PIPE MONITOR ---------- */
.mcp-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background: #f4f4f4;
  border-top: 2px solid #666666;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
  z-index: 900;
  display: flex;
  flex-direction: column;
  font-family: Monaco, Menlo, Consolas, monospace;
  font-size: 11px;
}

.mcp-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #e8e8e8 0%, #cccccc 100%);
  border-bottom: 1px solid #999999;
  padding: 4px 10px;
}

.mcp-meta {
  color: #006600;
  margin-left: 10px;
}

.mcp-drawer-body {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  padding: 6px 10px;
}

.mcp-tools-bar {
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
  color: #444444;
}

.mcp-tool-tag {
  display: inline-block;
  background: #eef4fc;
  border: 1px solid #b5cbe8;
  color: #003388;
  padding: 1px 5px;
  margin: 2px 3px 2px 0;
  border-radius: 2px;
  font-size: 10px;
}

.mcp-table {
  width: 100%;
  border-collapse: collapse;
}

.mcp-table th,
.mcp-table td {
  text-align: left;
  padding: 3px 6px;
  border-bottom: 1px solid #eeeeee;
}

.mcp-table th {
  background: #f0f0f0;
  color: #333333;
}

.mcp-ok {
  color: #007700;
  font-weight: bold;
}

.mcp-err {
  color: #cc0000;
  font-weight: bold;
}


/* YouTube Watched & DeArrow Badges */
.is-watched {
  opacity: 0.55;
}

.is-watched:hover {
  opacity: 1;
}

.thumb-watched-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #777777;
  color: #222222;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 4px;
  cursor: pointer;
  display: none;
}

.thumb-frame:hover .thumb-watched-btn,
.is-watched .thumb-watched-btn {
  display: inline-block;
}

.is-watched .thumb-watched-btn {
  background: #227722;
  color: #ffffff;
  border-color: #114411;
}

.dearrow-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  background: #e6f4ea;
  border: 1px solid #8fc99e;
  color: #186a3b;
  padding: 0 3px;
  border-radius: 2px;
  vertical-align: middle;
}


/* =========================================================
   GOOGLE OAUTH 2.0 RETRO MODAL & SIDEBAR CALLOUT
   ========================================================= */
.oauth-side-prompt,
.oauth-side-connected {
  background: #edf4fc;
  border: 1px solid #a6bddc;
  padding: 9px 10px;
  margin-bottom: 12px;
  font-size: 11px;
}

.oauth-side-connected {
  background: #eef8ee;
  border-color: #9ac99a;
}

.oauth-setup-box {
  background: #f8fbff;
  border: 1px solid #c3d6ec;
  padding: 10px;
}

.oauth-steps {
  margin: 0 0 10px 0;
  padding-left: 18px;
  font-size: 11px;
  line-height: 1.5;
  color: #333333;
}

.oauth-steps li {
  margin-bottom: 4px;
}

.oauth-connected-card {
  background: #eef8ee;
  border: 1px solid #9ac99a;
  padding: 10px;
}


/* =========================================================
   PLAYLISTS, LEGAL PAGES & RESPONSIVE MOBILE FALLBACK
   ========================================================= */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.playlist-card {
  border: 1px solid #cccccc;
  background: #fafafa;
  padding: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.legal-doc {
  margin-top: 12px;
}

.legal-body {
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.55;
}

.legal-body h2 {
  font-size: 15px;
  color: #003366;
  margin: 16px 0 6px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #dce5f2;
}

.legal-body ul {
  padding-left: 20px;
  margin: 6px 0 10px 0;
}

.legal-body li {
  margin-bottom: 4px;
}

.legal-body code {
  background: #f2f4f8;
  border: 1px solid #d5dfec;
  padding: 1px 4px;
  font-size: 11px;
}

@media (max-width: 979px) {
  #page-wrap {
    width: auto;
    max-width: 100%;
    padding: 8px 10px 40px 10px;
  }

  #top-bar,
  #search-strip,
  .two-col,
  .watch-layout {
    flex-direction: column;
    align-items: stretch;
  }

  #search-form {
    flex-wrap: wrap;
  }

  #search-input {
    width: 100%;
    flex: 1 1 220px;
  }

  .col-main,
  .col-side,
  .watch-left,
  .watch-right {
    width: 100%;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  }

  .video-card {
    width: auto;
  }

  .thumb-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .channels-grid,
  .playlists-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    width: calc(100vw - 24px) !important;
    max-width: 520px;
  }

  #nav-tabs {
    flex-wrap: wrap;
  }

  .nav-tab {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* Bookmarklet & Split Auth Cards */
.bookmarklet-box {
  background: #ffffdd;
  border: 1px solid #dfce5c;
  padding: 9px 10px;
}

.bookmarklet-pill {
  display: inline-block;
  text-decoration: none !important;
  cursor: grab;
  font-size: 12px;
  padding: 4px 12px;
}

.oauth-option-card {
  background: #f2f7fd;
  border: 1px solid #b5cbe4;
  padding: 9px 10px;
}
