/* YouTube Solid Minimalist Style (Authentic Dark Theme) */
:root {
  --yt-bg: #0f0f0f;
  --yt-surface: #181818;
  --yt-surface-hover: #222222;
  --yt-border: #272727;
  --yt-text: #f1f1f1;
  --yt-text-secondary: #aaaaaa;
  --yt-red: #cc0000;
  --yt-red-hover: #e60000;
  --yt-chip-bg: rgba(255, 255, 255, 0.1);
  --yt-chip-hover: rgba(255, 255, 255, 0.2);
  --yt-header-height: 56px;
  --yt-sidebar-width: 240px;
  --font-family: 'Cairo', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.yt-body {
  background-color: var(--yt-bg);
  color: var(--yt-text);
  font-family: var(--font-family);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.yt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--yt-header-height);
  background-color: var(--yt-bg);
  border-bottom: 1px solid var(--yt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yt-icon-btn {
  background: transparent;
  border: none;
  color: var(--yt-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.yt-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.yt-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--yt-text);
  user-select: none;
}

.logo-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
}

.country-code {
  font-size: 10px;
  color: var(--yt-text-secondary);
  align-self: flex-start;
  margin-top: 4px;
}

.header-center {
  flex: 0 1 600px;
  margin: 0 20px;
}

.yt-search-bar {
  display: flex;
  align-items: center;
  background: #121212;
  border: 1px solid #303030;
  border-radius: 40px;
  overflow: hidden;
}

.yt-search-bar:focus-within {
  border-color: #1c62b9;
}

.yt-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 16px;
  color: var(--yt-text);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
}

.yt-search-bar input::placeholder {
  color: var(--yt-text-secondary);
}

.yt-search-btn {
  background: #222222;
  border: none;
  border-right: 1px solid #303030;
  color: var(--yt-text);
  width: 64px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.yt-search-btn:hover {
  background: #2b2b2b;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Solid Clean Refresh Button */
.yt-refresh-btn {
  background-color: var(--yt-red);
  color: #ffffff;
  border: none;
  border-radius: 18px;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s;
  user-select: none;
}

.yt-refresh-btn:hover {
  background-color: var(--yt-red-hover);
}

.yt-refresh-btn.is-loading .refresh-svg {
  animation: spin 0.8s linear infinite;
}

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

/* Layout */
.yt-layout {
  display: flex;
  margin-top: var(--yt-header-height);
  min-height: calc(100vh - var(--yt-header-height));
}

/* Sidebar */
.yt-sidebar {
  width: var(--yt-sidebar-width);
  background-color: var(--yt-bg);
  padding: 12px 8px;
  position: sticky;
  top: var(--yt-header-height);
  height: calc(100vh - var(--yt-header-height));
  overflow-y: auto;
  flex-shrink: 0;
  border-left: 1px solid var(--yt-border);
  transition: width 0.2s, margin-right 0.2s;
}

.sidebar-collapsed .yt-sidebar {
  margin-right: calc(-1 * var(--yt-sidebar-width));
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--yt-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.sidebar-hr {
  height: 1px;
  background-color: var(--yt-border);
  margin: 10px 0;
}

.sidebar-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--yt-text-secondary);
  padding: 6px 12px;
}

.sidebar-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--yt-text-secondary);
}

.sidebar-stat-item strong {
  color: var(--yt-text);
}

/* Content */
.yt-content {
  flex: 1;
  padding: 16px 24px;
  width: 100%;
}

/* Category Chips Bar */
.chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
  display: none;
}

.dynamic-chips {
  display: flex;
  gap: 8px;
}

.chip {
  background-color: var(--yt-chip-bg);
  color: var(--yt-text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.chip:hover {
  background-color: var(--yt-chip-hover);
}

.chip.active {
  background-color: #f1f1f1;
  color: #0f0f0f;
  font-weight: 600;
}

/* Video Grid */
.feed-section {
  width: 100%;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px 16px;
}

/* Solid Minimal Video Card */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #202020;
}

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

.duration-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.card-meta {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #333333;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.meta-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--yt-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-channel {
  font-size: 12px;
  color: var(--yt-text-secondary);
  margin-top: 4px;
}

.meta-sub {
  font-size: 12px;
  color: var(--yt-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.meta-cat-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  color: #cccccc;
  background: #202020;
  border: 1px solid #333333;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
}

/* Skeleton Loading */
.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background-color: #202020;
}

.skeleton-text {
  height: 14px;
  border-radius: 4px;
  background-color: #202020;
}

/* Minimal Player Modal */
.yt-player-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.yt-player-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.player-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.player-box {
  position: relative;
  width: 95%;
  max-width: 1300px;
  max-height: 92vh;
  background: #121212;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--yt-border);
  background: #181818;
}

.player-meta-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-body {
  display: flex;
  flex: 1;
  overflow-y: auto;
}

.video-frame-container {
  flex: 2;
  aspect-ratio: 16 / 9;
  background: #000;
  min-height: 380px;
}

.video-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-sidebar-panel {
  flex: 1;
  min-width: 320px;
  max-width: 380px;
  background: #181818;
  border-right: 1px solid var(--yt-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.player-channel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yt-border);
}

.channel-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.channel-texts {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.player-cname {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.player-views {
  font-size: 12px;
  color: var(--yt-text-secondary);
}

.next-btn {
  background: var(--yt-chip-bg);
  border: 1px solid var(--yt-border);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
}

.next-btn:hover {
  background: var(--yt-chip-hover);
}

.playlist-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text-secondary);
}

.player-queue-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-card {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  background: #202020;
}

.queue-card:hover {
  background: #2a2a2a;
}

.queue-card.active {
  background: #333333;
}

.queue-thumb {
  width: 80px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
}

.queue-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.queue-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.queue-author {
  font-size: 11px;
  color: var(--yt-text-secondary);
}

/* Minimal Toast */
.yt-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #222222;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.yt-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-notice {
  text-align: center;
  padding: 40px;
  color: var(--yt-text-secondary);
}

.empty-notice.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .yt-sidebar {
    display: none;
  }
  .player-body {
    flex-direction: column;
  }
  .player-sidebar-panel {
    max-width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .header-center {
    display: none;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* Password Lock Screen (wiza123) */
.auth-lock-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 15, 15, 0.98);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.auth-lock-overlay.unlocked {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.auth-card {
  background-color: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 36px 30px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  transition: transform 0.2s;
}

.auth-logo-badge {
  width: 64px;
  height: 64px;
  background-color: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--yt-text);
  margin-bottom: 6px;
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  background-color: #272727;
  color: #ff9800;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.auth-desc {
  font-size: 13.5px;
  color: var(--yt-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.auth-input {
  width: 100%;
  height: 46px;
  background-color: #0f0f0f;
  border: 1px solid #383838;
  border-radius: 8px;
  color: #fff;
  padding: 0 44px 0 14px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: ltr;
  text-align: center;
  letter-spacing: 2px;
}

.auth-input:focus {
  border-color: #3ea6ff;
  box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.2);
}

.auth-toggle-pwd {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s;
}

.auth-toggle-pwd:hover {
  color: #fff;
}

.auth-error-msg {
  background-color: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff6b6b;
  font-size: 13px;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-error-msg.hidden {
  display: none;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  background-color: var(--yt-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: background-color 0.15s, transform 0.1s;
}

.auth-submit-btn:hover {
  background-color: var(--yt-red-hover);
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.auth-card.shake {
  animation: authShake 0.4s ease;
}

/* ==========================================================================
   Header Buttons: Live Mode Toggle & Keywords Manager
   ========================================================================== */
.yt-live-toggle-btn {
  background-color: #222222;
  color: var(--yt-text);
  border: 1px solid #383838;
  border-radius: 18px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.yt-live-toggle-btn:hover {
  background-color: #2b2b2b;
  border-color: #484848;
}

.yt-live-toggle-btn .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #717171;
  transition: background-color 0.2s ease;
  display: inline-block;
}

/* Active Live-Only State */
.yt-live-toggle-btn.live-active {
  background-color: #2b1111;
  border-color: #cc0000;
  color: #ff5252;
}

.yt-live-toggle-btn.live-active .live-dot {
  background-color: #ff0000;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.yt-keywords-btn {
  background-color: #222222;
  color: var(--yt-text);
  border: 1px solid #383838;
  border-radius: 18px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s, border-color 0.15s;
  user-select: none;
}

.yt-keywords-btn:hover {
  background-color: #2b2b2b;
  border-color: #484848;
}

/* ==========================================================================
   Keywords & Categories Manager Modal
   ========================================================================== */
.yt-keywords-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.yt-keywords-modal.active {
  display: flex;
}

.keywords-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.keywords-modal-box {
  position: relative;
  z-index: 10;
  background-color: #0f0f0f;
  border: 1px solid #282828;
  border-radius: 14px;
  width: min(920px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.keywords-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #222222;
  gap: 16px;
}

.km-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.km-title-row svg {
  margin-top: 3px;
  flex-shrink: 0;
}

.km-titles h2 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.km-titles p {
  font-size: 13px;
  color: var(--yt-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Toolbar */
.km-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background-color: #141414;
  border-bottom: 1px solid #222222;
  flex-wrap: wrap;
}

.km-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  background-color: #1f1f1f;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 0 12px;
  height: 38px;
  gap: 8px;
}

.km-search svg {
  color: #888888;
  flex-shrink: 0;
}

.km-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}

.km-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.km-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s, border-color 0.15s;
  user-select: none;
}

.km-btn-primary {
  background-color: var(--yt-red);
  color: #fff;
  border: none;
}

.km-btn-primary:hover {
  background-color: var(--yt-red-hover);
}

.km-btn-danger {
  background-color: transparent;
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.4);
}

.km-btn-danger:hover {
  background-color: rgba(255, 107, 107, 0.12);
  border-color: #ff6b6b;
}

.km-btn-subtle {
  background-color: transparent;
  color: var(--yt-text-secondary);
  border: 1px solid #333333;
}

.km-btn-subtle:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Add Category Form */
.km-add-form-container {
  padding: 16px 24px;
  background-color: #181818;
  border-bottom: 1px solid #272727;
  animation: slideDown 0.2s ease;
}

.km-add-form-container.hidden {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.km-form-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.km-form-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.km-form-row {
  display: flex;
  gap: 12px;
}

.km-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.km-form-field.flex-3 { flex: 3; }
.km-form-field.flex-1 { flex: 1; }

.km-form-field label {
  font-size: 12px;
  color: var(--yt-text-secondary);
}

.km-form-field input,
.km-form-field textarea {
  background-color: #121212;
  border: 1px solid #333333;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.km-form-field input:focus,
.km-form-field textarea:focus {
  border-color: #3ea6ff;
}

.km-form-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* Category Cards List */
.km-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.km-cat-card {
  background-color: #161616;
  border: 1px solid #262626;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}

.km-cat-card:hover {
  border-color: #383838;
}

.km-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.km-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.km-cat-icon {
  font-size: 20px;
  line-height: 1;
  background-color: #222222;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #303030;
}

.km-cat-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.km-cat-count {
  font-size: 11px;
  background-color: #242424;
  color: #aaaaaa;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #333333;
}

.km-cat-delete-btn {
  background: transparent;
  border: 1px solid rgba(255, 68, 68, 0.25);
  color: #ff6b6b;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: background-color 0.15s, border-color 0.15s;
}

.km-cat-delete-btn:hover {
  background-color: rgba(255, 68, 68, 0.12);
  border-color: #ff6b6b;
}

/* Tags / Queries Pill List */
.km-tags-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.km-tag-pill {
  background-color: #222222;
  border: 1px solid #333333;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  color: #dcdcdc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.km-tag-del-btn {
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  line-height: 1;
  transition: color 0.15s, background-color 0.15s;
}

.km-tag-del-btn:hover {
  color: #ff6b6b;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Inline Add Query */
.km-add-query-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #202020;
}

.km-inline-input {
  flex: 1;
  background-color: #121212;
  border: 1px solid #2c2c2c;
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.km-inline-input:focus {
  border-color: #3ea6ff;
}

.km-inline-add-btn {
  background-color: #272727;
  color: #fff;
  border: 1px solid #383838;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s;
}

.km-inline-add-btn:hover {
  background-color: #353535;
}

.km-empty-search {
  text-align: center;
  padding: 40px 20px;
  color: var(--yt-text-secondary);
  font-size: 14px;
}
