/* ============================================================
   Korsyl Search Engine — Main Stylesheet
   ============================================================ */

/* ---- Variables ---- */
:root {
  --k-blue:    #1a73e8;
  --k-purple:  #7c4dff;
  --k-grad:    linear-gradient(135deg, #1a73e8, #7c4dff);
  --k-grad-h:  linear-gradient(135deg, #1562cc, #6a3de8);
  --k-green:   #1e8e3e;
  --k-orange:  #e37400;
  --k-red:     #d32f2f;
  --k-bg:      #f8f9ff;
  --k-card:    #ffffff;
  --k-border:  #e8eaf6;
  --k-text:    #202124;
  --k-muted:   #5f6368;
  --k-shadow:  0 2px 12px rgba(26,115,232,.12);
  --k-shadow-lg: 0 8px 40px rgba(26,115,232,.18);
  --radius:    10px;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--k-bg);
  color: var(--k-text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.main-content { flex: 1; }
a { color: var(--k-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Navigation
   ============================================================ */
:root { --nav-h: 64px; }

.korsyl-nav {
  height: var(--nav-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--k-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.korsyl-nav.navbar-transparent {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  position: absolute;
  width: 100%;
}

/* Nav right group */
.nav-right-group { flex-shrink: 0; gap: 4px !important; }

.korsyl-logo {
  font-size: 22px;
  font-weight: 800;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 1rem;
}
.korsyl-nav .nav-link {
  color: var(--k-muted);
  font-size: 13.5px;
  padding: 6px 11px;
  border-radius: 7px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.korsyl-nav .nav-link:hover { background: var(--k-bg); color: var(--k-text); text-decoration: none; }

/* ---- Nav icon buttons (bell, admin) ---- */
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--k-muted); font-size: 16px;
  transition: background .15s, color .15s;
  position: relative; text-decoration: none;
}
.nav-icon-btn:hover { background: var(--k-bg); color: var(--k-text); }

/* ---- Nav avatar button ---- */
.nav-avatar-btn { text-decoration: none; }
.nav-avatar-btn .nav-avatar-img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}

/* ---- Account dropdown ---- */
.acct-dropdown {
  width: 300px;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.14) !important;
  border: 1px solid var(--k-border) !important;
  overflow: hidden;
}
.acct-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 20px 16px;
  text-align: center;
}
.acct-avatar-wrap { margin-bottom: 10px; }
.acct-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover;
}
.acct-avatar-letter {
  display: flex; align-items: center; justify-content: center;
  background: var(--k-grad);
  color: #fff; font-size: 26px; font-weight: 700;
}
.acct-greeting {
  font-size: 18px; font-weight: 600; color: var(--k-text);
  margin-bottom: 12px;
}
.acct-manage-btn {
  display: inline-block;
  border: 1px solid var(--k-border);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 13px; font-weight: 500;
  color: var(--k-blue);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.acct-manage-btn:hover { background: var(--k-bg); border-color: var(--k-blue); text-decoration: none; }
.acct-menu { padding: 6px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.acct-menu.acct-menu-full { grid-template-columns: 1fr; }
.acct-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px; color: var(--k-text);
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap; overflow: hidden;
}
.acct-item i { width: 14px; text-align: center; color: var(--k-muted); font-size: 13px; flex-shrink: 0; }
.acct-item:hover { background: var(--k-bg); text-decoration: none; color: var(--k-text); }
.acct-item.text-danger { color: #d32f2f !important; }
.acct-item.text-danger i { color: #d32f2f; }

/* ---- App Drawer toggle (9-dot grid) ---- */
.app-drawer-toggle {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
  padding: 0;
}
.app-drawer-toggle:hover { background: var(--k-bg); }
.app-drawer-dots {
  display: grid; grid-template-columns: repeat(3, 5px);
  gap: 3px; width: 17px;
}
.app-drawer-dots i {
  display: block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--k-muted);
  font-style: normal;
}
.app-drawer-toggle:hover .app-drawer-dots i { background: var(--k-text); }

/* ---- App Drawer panel ---- */
.app-drawer-panel {
  width: 280px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  border: 1px solid var(--k-border);
}
.app-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 4px;
}
.app-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--k-text);
  font-size: 12px; font-weight: 500;
  width: 80px;
  transition: background .15s;
  cursor: pointer;
}
.app-item:hover { background: var(--k-bg); text-decoration: none; color: var(--k-text); }
.app-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  flex-shrink: 0;
}
.app-item-soon { opacity: .4; cursor: default; }
.app-drawer-ext-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #202124;
  font-size: 13px;
  font-weight: 500;
  background: #f1f3f4;
  transition: background .15s;
  box-sizing: border-box;
}
.app-drawer-ext-btn:hover { background: #e8eaed; text-decoration: none; color: #202124; }
.app-drawer-ext-btn .fa-puzzle-piece { color: #e37400; font-size: 15px; flex-shrink: 0; }
.app-drawer-ext-btn .fa-chevron-right { font-size: 11px; color: #9aa0a6; margin-left: auto; }

/* mobile */
@media (max-width: 767px) {
  .nav-search-form { max-width: 100%; }
  .app-drawer-panel { width: calc(100vw - 24px); }
}
.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Nav search bar ---- */
.nav-search-form { max-width: 520px; }
.nav-search-group { border-radius: 24px; overflow: hidden; box-shadow: var(--k-shadow); }
.nav-search-input {
  border: 1.5px solid var(--k-border);
  border-right: none;
  border-radius: 24px 0 0 24px !important;
  padding: 8px 16px;
  font-size: 14px;
  background: #fff;
}
.nav-search-input:focus { box-shadow: none; border-color: var(--k-blue); outline: none; }
.nav-search-btn {
  background: var(--k-grad);
  border: none;
  border-radius: 0 24px 24px 0 !important;
  padding: 0 18px;
  font-size: 14px;
}
.nav-search-btn:hover { background: var(--k-grad-h); }

/* ============================================================
   Buttons
   ============================================================ */
.btn-korsyl {
  background: var(--k-grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity .2s, box-shadow .2s;
}
.btn-korsyl:hover { opacity: .9; color: #fff; box-shadow: var(--k-shadow); }
.btn-korsyl:disabled { opacity: .6; }
.btn-korsyl-outline {
  border: 2px solid var(--k-blue);
  color: var(--k-blue);
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
}
.btn-korsyl-outline:hover { background: var(--k-blue); color: #fff; }

/* ============================================================
   HOMEPAGE
   ============================================================ */
.home-wrapper {
  min-height: 100vh;
  background: linear-gradient(160deg, #f0f4ff 0%, #faf8ff 60%, #fff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
}
.home-logo {
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 900;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 10px;
}
.home-tagline {
  font-size: 16px;
  color: var(--k-muted);
  margin-bottom: 36px;
}
.home-search-wrap {
  width: 100%;
  max-width: 600px;
  margin-bottom: 28px;
}
.home-search-group {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--k-shadow-lg);
  transition: box-shadow .25s;
}
.home-search-group:focus-within { box-shadow: 0 8px 40px rgba(26,115,232,.28); }
.home-search-input {
  border: 1.5px solid #dde3ff;
  border-right: none;
  border-radius: 28px 0 0 28px !important;
  padding: 16px 22px;
  font-size: 17px;
  background: #fff;
}
.home-search-input:focus { box-shadow: none; border-color: var(--k-blue); outline: none; }
.home-search-btn {
  background: var(--k-grad);
  border: none;
  padding: 0 28px;
  font-size: 16px;
  border-radius: 0 28px 28px 0 !important;
  color: #fff;
  min-width: 56px;
}
.home-search-btn:hover { background: var(--k-grad-h); }
.home-tips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--k-muted);
}
.home-tip-badge {
  background: #fff;
  border: 1px solid var(--k-border);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: default;
}
.home-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  align-items: center;
}
.home-sug-label { font-size: 12px; color: var(--k-muted); font-weight: 600; }
.home-sug-chip {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--k-text);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.home-sug-chip:hover { border-color: var(--k-primary); color: var(--k-primary); }
.home-stats {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  text-align: center;
}
.home-stat-num { font-size: 24px; font-weight: 700; color: var(--k-blue); }
.home-stat-lbl { font-size: 12px; color: var(--k-muted); }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-layout { padding: 24px 0 40px; max-width: 720px; }
.results-col   { width: 100%; }

/* Result card */
.result-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--k-border);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: box-shadow .15s, transform .15s;
}
.result-card:hover { box-shadow: var(--k-shadow); transform: translateY(-1px); }
.result-favicon {
  width: 18px; height: 18px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -3px;
  object-fit: contain;
}
.result-domain { font-size: 12px; color: var(--k-muted); }
.result-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--k-blue);
  display: block;
  margin: 4px 0;
  cursor: pointer;
}
.result-title:hover { text-decoration: underline; }
.result-desc { font-size: 14px; color: var(--k-text); line-height: 1.6; margin-bottom: 6px; }
.result-meta { font-size: 12px; color: #aaa; }
.result-url { font-size: 13px; color: var(--k-green); margin-bottom: 4px; }
.btn-bookmark-result {
  background: none; border: none; padding: 0 2px; cursor: pointer;
  color: #ccc; font-size: 13px; line-height: 1; transition: color 0.15s;
}
.btn-bookmark-result:hover, .btn-bookmark-result.bookmarked { color: var(--k-primary); }
.btn-rate-site {
  background: none; border: 1px solid rgba(245,158,11,.35); border-radius: 20px;
  padding: 2px 8px; font-size: 11px; cursor: pointer; color: #f59e0b;
  transition: background .15s, color .15s; white-space: nowrap; line-height: 1.4;
}
.btn-rate-site:hover { background: rgba(245,158,11,.12); }
.btn-bookmark-search {
  background: none; border: 1px solid var(--k-border); border-radius: 20px;
  padding: 3px 12px; font-size: 12px; cursor: pointer; color: var(--k-muted);
  transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.btn-bookmark-search:hover, .btn-bookmark-search.bookmarked {
  border-color: var(--k-primary); color: var(--k-primary);
}

/* Music card */
.music-card {
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
}
.music-card-inner {
  display: flex;
  gap: 16px;
  padding: 18px 20px 14px;
}
.music-card-icon {
  width: 44px; height: 44px;
  background: var(--k-grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
}
.music-card-body { flex: 1; min-width: 0; }
.music-card-track { font-size: 17px; font-weight: 700; color: var(--k-text); line-height: 1.3; }
.music-card-artist { font-size: 13px; color: var(--k-muted); margin-top: 2px; }
.music-card-lyrics {
  margin-top: 12px;
  font-size: 14px;
  color: var(--k-text);
  line-height: 1.7;
}
.lyric-verse {
  margin: 0 0 12px 0;
  line-height: 1.7;
}
.lyric-verse:last-child { margin-bottom: 0; }
.music-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid var(--k-border);
  background: var(--k-surface-2, var(--k-surface));
  font-size: 12px;
}
.music-card-mxm {
  color: var(--k-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.music-card-mxm:hover { color: var(--k-primary); }

/* ---- Status indicators on results ---- */
.result-card.status-pending  { border-left: 3px solid var(--k-orange); }
.result-card.status-blacklisted { border-left: 3px solid var(--k-red); }
.result-card.status-approved { border-left: 3px solid var(--k-green); }

.badge { font-size: 11px; font-weight: 600; }
.bg-success { background-color: var(--k-green) !important; }

/* Security tips sidebar */
.tips-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.tips-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--k-border);
  padding: 18px;
}
.tips-card h6 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--k-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tip-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--k-border);
}
.tip-item:last-child { border-bottom: none; padding-bottom: 0; }
.tip-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8f0fe, #e3d0ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--k-blue);
  font-size: 13px;
  flex-shrink: 0;
  margin-right: 10px;
}
.tip-title { font-size: 13px; font-weight: 600; color: var(--k-text); }
.tip-body  { font-size: 12px; color: var(--k-muted); line-height: 1.5; margin-top: 2px; }

/* ---- Answer card (featured snippet) ---- */
.answer-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #f8f5ff 100%);
  border: 1px solid #d0d8ff;
  border-left: 4px solid var(--k-blue);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.answer-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.answer-card-icon {
  color: var(--k-blue);
  font-size: 15px;
  flex-shrink: 0;
}
.answer-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--k-blue);
}
.answer-time {
  font-size: 52px;
  font-weight: 800;
  color: var(--k-text);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 6px;
}
.answer-card-content {
  font-size: 15px;
  color: var(--k-text);
  line-height: 1.6;
}
.answer-card-sub {
  font-size: 12px;
  color: var(--k-muted);
  margin-top: 6px;
}

/* ---- Domain sub-results (Google-style grouped rows) ---- */
.result-subpages {
  margin-top: 10px;
  border-top: 1px solid var(--k-border);
}
.result-sub-item {
  border-bottom: 1px solid var(--k-border);
}
.result-sub-item:last-of-type { border-bottom: none; }
.result-sub-link {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  text-decoration: none !important;
  transition: background .12s, border-color .12s;
}
.result-sub-link:hover {
  background: #f8f9ff;
  border-left-color: var(--k-blue);
}
.result-sub-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--k-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-sub-snippet {
  font-size: 12px;
  color: var(--k-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.result-sub-pending .result-sub-title     { color: var(--k-orange); }
.result-sub-blacklisted .result-sub-title { color: var(--k-red); }
.result-sub-hidden { display: none; }
.result-sub-more {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--k-blue);
  cursor: pointer;
  text-align: left;
  border-top: 1px solid var(--k-border);
}
.result-sub-more:hover { text-decoration: underline; }

/* Search stats bar */
.search-stats {
  font-size: 13px;
  color: var(--k-muted);
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--k-border);
  margin-bottom: 16px;
}

/* Pagination */
.korsyl-pagination .page-link {
  border-radius: 6px !important;
  color: var(--k-blue);
  margin: 0 2px;
  border: 1px solid var(--k-border);
}
.korsyl-pagination .page-item.active .page-link {
  background: var(--k-grad);
  border-color: transparent;
}

/* ============================================================
   DOMAIN BADGES
   ============================================================ */

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 3px 9px;
  border-radius: 20px;
  color: #fff;
  white-space: nowrap;
  cursor: default;
  position: relative;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s;
}
.domain-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
}

/* Korsyl Verified — blue/purple gradient, feels "official" */
.badge-korsyl-verified {
  background: var(--k-grad);
}
.badge-korsyl-verified::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.3);
  pointer-events: none;
}

/* Staff Choice — gold, premium feel */
.badge-staff-choice {
  background: linear-gradient(135deg, #f9a825, #e65100);
}

/* Education Certified — green, trustworthy */
.badge-education {
  background: linear-gradient(135deg, #1e8e3e, #00695c);
}

/* Badge group on search results */
.result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 4px;
}

/* Badge legend cards (used on admin domains page) */
.badge-legend-card {
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--k-border);
  background: #fff;
}
.badge-legend-card .badge-preview {
  font-size: 14px;
  margin-bottom: 10px;
}
.badge-legend-card h6 { margin: 8px 0 4px; font-weight: 700; }
.badge-legend-card p  { font-size: 13px; color: var(--k-muted); margin: 0; }

/* Tooltip arrow tweak */
.tooltip-inner { max-width: 240px; font-size: 12px; }

/* ============================================================
   WARNINGS & BLACKLIST
   ============================================================ */
.warning-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.warning-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--k-shadow-lg);
  max-width: 600px;
  width: 100%;
  overflow: hidden;
}
.warning-header-pending  { background: linear-gradient(135deg, #e37400, #f9a825); }
.warning-header-blacklisted { background: linear-gradient(135deg, #c62828, #d32f2f); }
.warning-header-icon { font-size: 48px; margin-bottom: 8px; }
.warning-header h2 { font-size: 22px; font-weight: 700; }
.warning-body { padding: 28px; }
.warning-url {
  background: var(--k-bg);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--k-muted);
  word-break: break-all;
  margin: 14px 0;
}
.warning-reason {
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #c62828;
  margin: 14px 0;
}

/* ============================================================
   AUTH PAGES (Login / Register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #f0f4ff 0%, #faf8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--k-shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-logo {
  font-size: 36px;
  font-weight: 900;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  text-align: center;
  margin-bottom: 4px;
}
.auth-subtitle { text-align: center; color: var(--k-muted); font-size: 14px; margin-bottom: 28px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--k-muted); margin-bottom: 4px; }
.form-control:focus { border-color: var(--k-blue); box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.auth-divider { position: relative; text-align: center; margin: 20px 0; color: var(--k-muted); font-size: 13px; }
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--k-border);
}
.auth-divider span { background: #fff; padding: 0 12px; position: relative; }
.password-wrap { position: relative; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--k-muted); cursor: pointer; padding: 0;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: #1a1a2e;
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.admin-sidebar-logo {
  padding: 20px;
  font-size: 22px;
  font-weight: 800;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar-logo small { display: block; font-size: 11px; color: #888; font-weight: 400; margin-top: 2px; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(255,255,255,.07);
  color: #fff;
  border-left-color: var(--k-blue);
  text-decoration: none;
}
.admin-nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b0b8c8;
  padding: 16px 20px 4px;
}
/* ── Sidebar collapsible groups ── */
.admin-nav-group { margin: 0; }
.admin-nav-group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  color: #b0b8c8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 20px 4px;
  cursor: pointer;
  transition: color .15s;
  line-height: 1;
}
.admin-nav-group-toggle:hover,
.admin-nav-group-toggle:focus { color: #fff; outline: none; box-shadow: none; }
.admin-nav-group-toggle > span { flex: 1; text-align: left; }
.admin-nav-chevron {
  font-size: 8px;
  color: #b0b8c8;
  transition: transform .2s;
}
.admin-nav-group-toggle:hover .admin-nav-chevron { color: #fff; }
.admin-nav-group-toggle.collapsed .admin-nav-chevron { transform: rotate(-90deg); }
.admin-nav-sub {
  padding-left: 36px !important;
  font-size: 13.5px !important;
}
.admin-main { flex: 1; background: var(--k-bg); overflow-x: hidden; display: flex; flex-direction: column; min-height: 0; }
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 28px;
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  flex-shrink: 0;
}
.admin-topbar-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  color: var(--k-text);
}
.admin-topbar-actions { display: flex; gap: 8px; margin-left: auto; }
/* All page content sits below topbar */
.admin-main > *:not(.admin-topbar) { padding: 0 28px; }
.admin-main > .admin-topbar + * { padding-top: 28px; }
.admin-main > *:last-child { padding-bottom: 28px; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 { font-size: 22px; font-weight: 700; color: var(--k-text); margin: 0; }

/* Stats cards */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--k-border);
  padding: 20px;
  text-align: center;
}
.stat-card .stat-num { font-size: 36px; font-weight: 800; line-height: 1; }
.stat-card .stat-lbl { font-size: 12px; color: var(--k-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Data table */
.korsyl-table { background: #fff; border-radius: var(--radius); border: 1px solid var(--k-border); overflow: hidden; }
.korsyl-table table { margin: 0; }
.korsyl-table thead th {
  background: var(--k-bg);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--k-muted);
  border-bottom: 1px solid var(--k-border);
  padding: 12px 14px;
}
.korsyl-table tbody td { font-size: 13px; padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid #f5f5f5; }
.korsyl-table tbody tr:last-child td { border-bottom: none; }
.korsyl-table tbody tr:hover { background: #fafbff; }

/* ============================================================
   CRAWL STATUS PAGE
   ============================================================ */
.crawl-log {
  background: #1a1a2e;
  color: #a8ffb0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  border-radius: 8px;
  padding: 16px;
  height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.crawl-log .log-err  { color: #ff8a80; }
.crawl-log .log-warn { color: #ffe082; }
.crawl-log .log-ok   { color: #a8ffb0; }
.crawl-log .log-info { color: #80d8ff; }

/* Progress bar */
.crawl-progress { height: 8px; border-radius: 4px; }

/* ============================================================
   REQUEST PAGE
   ============================================================ */
.request-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--k-shadow);
  padding: 36px;
  max-width: 620px;
  margin: 48px auto;
}

/* ============================================================
   Footer
   ============================================================ */
.korsyl-footer {
  margin-top: auto;
  background: #0f1117;
  color: #c9cdd4;
}
.korsyl-footer-inner {
  border-top: 3px solid transparent;
  border-image: var(--k-grad) 1;
}

/* Brand */
.footer-brand {
  font-size: 28px;
  font-weight: 900;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.footer-tagline {
  font-size: 13px;
  color: #737880;
  line-height: 1.6;
  max-width: 280px;
}

/* Stats */
.footer-stat { text-align: center; min-width: 80px; }
.footer-stat-num {
  font-size: 20px;
  font-weight: 800;
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-stat-lbl { font-size: 11px; color: #737880; margin-top: 2px; }

/* Column headings */
.footer-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e2e5ea;
  margin-bottom: 16px;
}

/* Link lists */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 13px;
  color: #8a8f9a;
  text-decoration: none;
  transition: color .15s;
  display: flex;
  align-items: center;
}
.footer-links a i { opacity: .55; font-size: 11px; min-width: 18px; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-links a:hover i { opacity: 1; }

/* Browser download strip */
.footer-browser-strip {
  border-top: 1px solid #1e2028;
  border-bottom: 1px solid #1e2028;
  padding: 16px 0;
  margin-top: 8px;
  background: rgba(26,115,232,.06);
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid #1e2028;
  padding: 20px 0;
  margin-top: 8px;
}
.footer-copy { font-size: 12px; color: #555a63; }
.footer-bottom-link { font-size: 12px; color: #555a63; text-decoration: none; }
.footer-bottom-link:hover { color: #e2e5ea; text-decoration: none; }

/* Legacy helper kept for any stray .footer-link refs */
.footer-link { font-size: 13px; color: #8a8f9a; }
.footer-link:hover { color: #fff; }

/* ============================================================
   Modal overrides
   ============================================================ */
.modal-content { border-radius: 14px; border: none; box-shadow: var(--k-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--k-border); }

/* ============================================================
   Utilities
   ============================================================ */
.text-gradient {
  background: var(--k-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.korsyl-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--k-border);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--k-muted);
}
.no-results i { font-size: 48px; opacity: .3; margin-bottom: 16px; }

/* ============================================================
   Korsyl Email Preview (register page)
   ============================================================ */
.korsyl-email-preview {
  display: flex;
  align-items: center;
  background: #f0f4ff;
  border: 1px solid var(--k-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--k-blue);
  letter-spacing: .01em;
}

/* ============================================================
   Nav avatar image
   ============================================================ */
.nav-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--k-border);
}

/* ============================================================
   Settings page
   ============================================================ */
.settings-avatar-wrap {
  flex-shrink: 0;
}
.settings-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--k-border);
  box-shadow: var(--k-shadow);
}
.settings-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 3px solid var(--k-border);
}

/* Avatar upload preview (in card) */
.avatar-upload-preview {
  flex-shrink: 0;
}
.avatar-upload-preview img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--k-border);
}
.avatar-upload-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

/* ============================================================
   Family cards
   ============================================================ */
.family-child-card {
  background: #f8f9ff;
  border: 1px solid var(--k-border);
  border-radius: var(--radius);
  padding: 16px;
}
.family-child-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--k-border);
}
.family-child-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   Search History
   ============================================================ */
.search-history-list {
  display: flex;
  flex-direction: column;
}
.search-history-item {
  padding: 9px 4px;
  border-bottom: 1px solid var(--k-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.search-history-item:last-child { border-bottom: none; }
.search-history-item a { color: var(--k-text); font-size: 14px; flex: 1; }
.search-history-item a:hover { color: var(--k-blue); text-decoration: none; }

/* ============================================================
   Cookie Consent Banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #0f1117;
  border-top: 2px solid var(--k-blue);
  padding: 14px 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
  animation: slideUpBanner .3s ease;
}
@keyframes slideUpBanner {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-banner-text {
  color: #c9d1e0;
  font-size: 13.5px;
  flex: 1;
  min-width: 200px;
}
.cookie-banner-text a {
  color: var(--k-blue);
  text-decoration: underline;
}
.cookie-banner-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-btns  { justify-content: stretch; }
  .cookie-banner-btns .btn { flex: 1; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .admin-sidebar { position: fixed; left: -240px; transition: left .25s; }
  .admin-sidebar.open { left: 0; }
  .admin-main { padding: 16px; }
  .auth-card { padding: 28px 20px; }
  .home-stats { gap: 12px; }
}

/* ── Video search card (search results page) ── */
.video-search-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 14px 16px;
}
.video-search-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.video-search-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 4px;
  transition: background .15s;
}
.video-search-item:hover { background: #f5f5f5; color: inherit; }

/* ── Did you mean? ── */
.did-you-mean {
  font-size: 14px;
  margin-bottom: 10px;
  color: #555;
}
.dym-link {
  font-style: italic;
  font-weight: 500;
  color: var(--k-blue, #1a56db);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dym-link:hover { color: var(--k-blue-dark, #1140a8); }

/* ============================================================
   Notification bell + dropdown
   ============================================================ */
.notif-bell-btn { font-size: 18px; }

.notif-badge {
  position: absolute;
  top: 2px; right: 0;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 2px solid #fff;
}

.notif-dropdown {
  width: 340px;
  max-height: 460px;
  overflow-y: auto;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,.14) !important;
}
.notif-dd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.notif-mark-all { text-decoration: none; }
.notif-mark-all:hover { text-decoration: underline; }

.notif-dd-empty {
  padding: 24px 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.notif-dd-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  transition: background .1s;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
}
.notif-dd-item:hover { background: #f8f9fa; color: #333; }
.notif-dd-unread { background: #f0f7ff; }
.notif-dd-unread:hover { background: #e8f2ff; }

.notif-dd-icon {
  font-size: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-dd-body { flex: 1; min-width: 0; }
.notif-dd-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-dd-time { font-size: 11px; color: #999; margin-top: 2px; }

.notif-dot-sm {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #dc3545;
  flex-shrink: 0;
  margin-top: 4px;
}

.notif-dd-footer {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--k-blue, #1a56db);
  text-decoration: none;
  border-top: 1px solid #f0f0f0;
  position: sticky;
  bottom: 0;
  background: #fff;
}
.notif-dd-footer:hover { text-decoration: underline; }

/* Full notifications page */
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  background: #fff;
  border: 1px solid #eee;
  transition: background .12s;
  position: relative;
}
.notif-item:hover { background: #f8f9fa; color: #333; }
.notif-unread { background: #f0f7ff; border-color: #d0e8ff; }

.notif-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 500; }
.notif-msg   { font-size: 13px; color: #666; margin-top: 2px; }
.notif-time  { font-size: 12px; color: #999; margin-top: 4px; }
.notif-dot   {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #dc3545;
  flex-shrink: 0;
  margin-top: 6px;
}

/* ============================================================
   Calculator / Converter answer card
   ============================================================ */
.answer-card-calc {
  border-left: 3px solid var(--k-green, #1a7a4a);
}
.calc-result {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  padding: 6px 0 4px;
  font-family: 'Courier New', monospace;
  letter-spacing: .5px;
}

/* ============================================================
   People Also Ask accordion
   ============================================================ */
.paa-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
}
.paa-header {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px 10px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.paa-item { border-bottom: 1px solid #f0f0f0; }
.paa-item:last-child { border-bottom: none; }

.paa-q {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: background .12s;
}
.paa-q:hover { background: #f8f9fa; }
.paa-chevron {
  font-size: 11px;
  color: #999;
  transition: transform .2s;
  flex-shrink: 0;
}
.paa-q[aria-expanded="true"] .paa-chevron { transform: rotate(180deg); }

.paa-a {
  padding: 4px 16px 14px;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  border-top: 1px solid #f5f5f5;
  background: #fafafa;
}

/* ============================================================
   Search Autocomplete Dropdown
   ============================================================ */
.ks-suggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1080;
  background: var(--k-card);
  border: 1px solid var(--k-border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 340px;
  overflow-y: auto;
}
.ks-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--k-text);
  cursor: pointer;
  transition: background .1s;
}
.ks-suggest-item:hover,
.ks-suggest-active {
  background: var(--k-bg);
}
.ks-sug-icon {
  color: var(--k-muted);
  font-size: 12px;
  flex-shrink: 0;
}

/* ============================================================
   Search Tabs (Web / Videos / Channels / Jobs)
   ============================================================ */
.search-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 2px solid var(--k-border);
  padding-bottom: 0;
}
.search-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--k-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.search-tab:hover {
  color: var(--k-blue);
  background: rgba(26,115,232,.05);
  border-radius: 6px 6px 0 0;
}
.search-tab-active {
  color: var(--k-blue);
  border-bottom-color: var(--k-blue);
  font-weight: 600;
}

/* ============================================================
   Watch Later Page
   ============================================================ */
.wl-list { display: flex; flex-direction: column; gap: 12px; }
.wl-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--k-card);
  border-radius: var(--radius);
  border: 1px solid var(--k-border);
  padding: 10px;
  transition: box-shadow .15s;
}
.wl-item:hover { box-shadow: var(--k-shadow); }

.wl-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 168px;
  border-radius: 6px;
  overflow: hidden;
}
.wl-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.wl-dur {
  position: absolute;
  bottom: 4px; right: 5px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
}
.wl-info { flex: 1; min-width: 0; }
.wl-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--k-text);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wl-title:hover { color: var(--k-blue); }
.wl-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--k-muted);
  text-decoration: none;
}
.wl-channel:hover { color: var(--k-blue); }
.wl-ch-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.wl-ch-initial {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.wl-remove-form { flex-shrink: 0; }
.wl-remove-btn {
  background: none;
  border: none;
  color: var(--k-muted);
  padding: 6px 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-size: 13px;
}
.wl-remove-btn:hover { background: #f5f5f5; color: var(--k-red); }

@media (max-width: 600px) {
  .wl-thumb-wrap { width: 120px; }
}

/* ============================================================
   Trending Page
   ============================================================ */
.trend-section-header {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--k-border);
  background: var(--k-bg);
}
.trend-search-list {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: trend;
}
.trend-search-list li { border-bottom: 1px solid var(--k-border); }
.trend-search-list li:last-child { border-bottom: none; }
.trend-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--k-text);
  transition: background .12s;
}
.trend-search-item:hover { background: var(--k-bg); }
.trend-rank {
  font-weight: 700;
  color: var(--k-muted);
  font-size: 13px;
  min-width: 20px;
}
.trend-query { flex: 1; font-size: 14px; }
.trend-count {
  font-size: 12px;
  color: var(--k-muted);
  background: var(--k-bg);
  border-radius: 20px;
  padding: 2px 8px;
}

/* Trending Videos */
.trend-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--k-border);
}
.trend-video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--k-text);
  background: var(--k-card);
  transition: background .12s;
}
.trend-video-card:hover { background: var(--k-bg); }
.trend-video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.trend-video-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.trend-video-dur {
  position: absolute;
  bottom: 4px; right: 5px;
  background: rgba(0,0,0,.75);
  color: #fff; font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
}
.trend-video-body { padding: 8px 10px; }
.trend-video-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.trend-video-meta {
  font-size: 11px;
  color: var(--k-muted);
  display: flex;
  gap: 4px;
}

/* Trending Channels */
.trend-ch-list { display: flex; flex-direction: column; }
.trend-ch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--k-border);
  text-decoration: none;
  color: var(--k-text);
  transition: background .12s;
}
.trend-ch-item:last-child { border-bottom: none; }
.trend-ch-item:hover { background: var(--k-bg); }
.trend-ch-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.trend-ch-initial {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--k-grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trend-ch-info { flex: 1; min-width: 0; }
.trend-ch-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-ch-sub  { margin-top: 2px; }
.trend-ch-rank { font-weight: 700; color: var(--k-muted); font-size: 13px; }

@media (max-width: 600px) {
  .trend-video-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Search History Page
   ============================================================ */
.hist-group { margin-bottom: 24px; }
.hist-date-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--k-muted);
  margin-bottom: 6px;
  padding-left: 2px;
}
.hist-items { }
.hist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--k-border);
  transition: background .12s;
}
.hist-item:last-child { border-bottom: none; }
.hist-item:hover { background: var(--k-bg); }
.hist-query {
  flex: 1;
  font-size: 14px;
  color: var(--k-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-query:hover { color: var(--k-blue); }
.hist-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hist-del-form { margin: 0; }
.hist-del-btn {
  background: none;
  border: none;
  color: #ccc;
  padding: 4px 6px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  transition: background .12s, color .12s;
}
.hist-del-btn:hover { background: #f5f5f5; color: var(--k-red); }

/* ============================================================
   Video Card — Watch Later overlay button
   ============================================================ */
.vc-wl-btn {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.72);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, background .15s;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  white-space: nowrap;
}
.video-card:hover .vc-wl-btn { opacity: 1; transform: translateY(0); }
.vc-wl-btn:hover { background: rgba(0,0,0,.9); }
.vc-wl-btn.vc-wl-saved { background: var(--k-green); }

/* ============================================================
   Default Search Engine Prompt Banner
   ============================================================ */
.ks-default-prompt {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-bottom: 2px solid rgba(26,115,232,.4);
  padding: 12px 20px;
  transition: opacity .3s;
}
.ks-default-prompt-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ks-default-icon {
  width: 36px; height: 36px;
  background: var(--k-grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.ks-default-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  min-width: 200px;
}
.ks-default-sub {
  font-size: 12px;
  opacity: .7;
}
.ks-default-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.ks-default-actions .btn-outline-secondary {
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.3);
}
.ks-default-actions .btn-outline-secondary:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.ks-default-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  padding: 4px 6px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.ks-default-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Setup modal */
.ks-browser-tabs { gap: 4px; }
.ks-browser-tabs .nav-link {
  padding: 5px 12px;
  font-size: 13px;
  color: var(--k-muted);
  border-radius: 20px;
}
.ks-browser-tabs .nav-link.active {
  background: var(--k-blue);
  color: #fff;
}
.ks-steps {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--k-text);
}
.ks-steps li { margin-bottom: 4px; }
.ks-steps code {
  background: #f0f4ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--k-blue);
}
kbd {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: #333;
}
.ks-tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #78350f;
  margin-top: 12px;
}

/* ── Extensions marketplace ───────────────────────────── */
.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.ext-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ext-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.13); transform: translateY(-2px); }
.ext-icon {
  width: 64px; height: 64px; border-radius: 16px;
  object-fit: cover; flex-shrink: 0;
}
.ext-icon-placeholder {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg,#f9ab00,#e37400);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; flex-shrink: 0;
}
.ext-name { font-weight: 700; font-size: 15px; color: #202124; }
.ext-developer { font-size: 12px; color: #5f6368; }
.ext-tagline { font-size: 13px; color: #444; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ext-stars { color: #f9ab00; font-size: 12px; }
.ext-meta { font-size: 12px; color: #5f6368; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ext-cat-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #e8f0fe; color: #1a73e8; font-weight: 500; }
.btn-add-ext { background: linear-gradient(135deg,#1a73e8,#7c4dff); color:#fff; border:none; border-radius:8px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; text-decoration:none; display:inline-block; transition: opacity .15s; }
.btn-add-ext:hover { opacity:.88; color:#fff; text-decoration:none; }
.ext-featured-row { display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; }
.ext-featured-card { min-width:220px; max-width:220px; background:#fff; border-radius:16px; box-shadow:0 1px 4px rgba(0,0,0,.1); overflow:hidden; flex-shrink:0; }
.ext-featured-banner { height:100px; background:linear-gradient(135deg,#1a73e8,#7c4dff); display:flex; align-items:center; justify-content:center; font-size:40px; }
.ext-featured-body { padding:12px; }
.ext-rating-bar { display:flex; align-items:center; gap:8px; font-size:12px; margin-bottom:3px; }
.ext-rating-bar-fill { flex:1; height:6px; background:#e0e0e0; border-radius:3px; overflow:hidden; }
.ext-rating-bar-inner { height:100%; background:#f9ab00; border-radius:3px; }

/* ── Google-style Account Settings ──────────────────── */
.settings-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  background: #f1f3f4;
}
.settings-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 24px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.settings-sidebar-profile {
  text-align: center;
  padding: 0 16px 24px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 8px;
}
.settings-sidebar-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
}
.settings-sidebar-avatar-letter {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg,#1a73e8,#7c4dff);
  color: #fff; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.settings-sidebar-name { font-weight: 700; font-size: 15px; color: #202124; }
.settings-sidebar-email { font-size: 12px; color: #5f6368; word-break: break-all; }
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  color: #202124;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 24px 24px 0;
  margin-right: 12px;
  transition: background .15s;
}
.settings-nav-item:hover { background: #f1f3f4; color: #202124; text-decoration: none; }
.settings-nav-item.active { background: #e8f0fe; color: #1a73e8; }
.settings-nav-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.settings-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 64px);
}
.settings-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 24px;
}
.settings-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.settings-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f3f4;
}
.settings-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.settings-home-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  text-decoration: none;
  color: #202124;
  transition: box-shadow .2s, transform .2s;
  display: block;
}
.settings-home-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); color: #202124; text-decoration: none; }
.settings-home-card-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; margin-bottom: 12px;
}
.settings-home-card h6 { font-weight: 700; margin-bottom: 4px; }
.settings-home-card p { font-size: 13px; color: #5f6368; margin: 0; }
.settings-quick-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px;
}
.settings-quick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 20px;
  border: 1px solid #dadce0; background: #fff;
  font-size: 13px; font-weight: 500; color: #202124;
  text-decoration: none; transition: background .15s;
}
.settings-quick-chip:hover { background: #f1f3f4; color: #202124; text-decoration: none; }
@media (max-width: 767px) {
  .settings-layout { flex-direction: column; }
  .settings-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid #e0e0e0; padding: 16px 0; }
  .settings-nav-item { border-radius: 8px; margin-right: 8px; }
  .settings-content { padding: 16px; }
}
