/* =========================================================================
   Dorset Karaoke — Public Search Master (Final Integrated CSS)
   ========================================================================= */

:root {
  --bg-gradient: linear-gradient(145deg, #f0f4ff 0%, #dce5ff 60%, #b8c7ff 100%);
  --panel: rgba(255, 255, 255, 0.75);
  --panel-border: rgba(0, 0, 0, 0.1);
  --text: #0e1116;
  --accent: #1e258a; 
  --accent-soft: rgba(30, 37, 138, 0.1);
  --danger: #ef4444;
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"], html.theme-dark {
  color-scheme: dark;
  --bg-gradient: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  --panel: rgba(30, 41, 59, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --accent: #4f46e5; 
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: var(--bg-gradient); background-attachment: fixed; color: var(--text); min-height: 100vh; line-height: 1.5; }
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 20px 60px; }

/* ==== HEADER ==== */
.header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; position: relative; min-height: 85px; }
.header-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin: 0 !important; font-size: 2.2rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: -1.5px; line-height: 0.9;
  text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sub { text-align: center; font-size: 14px; opacity: 0.7; margin-top: 60px; margin-bottom: 35px; }

/* ==== SEARCH ROW ==== */
.search-row { 
  display: flex; gap: 10px; background: var(--panel); padding: 10px; 
  border-radius: 20px; border: 1px solid var(--panel-border); 
  max-width: 850px; margin: 0 auto 25px; box-shadow: var(--shadow);
}
.search-select { padding: 10px; border-radius: 12px; border: 1px solid var(--panel-border); background: var(--panel); color: var(--text); font-weight: 700; cursor: pointer; }
.search-input { 
  flex: 1; min-width: 150px; padding: 10px 10px 10px 42px; border: 1px solid var(--panel-border); 
  border-radius: 12px; background: var(--panel); color: var(--text); font-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 18px;
}

/* ==== BUTTONS (Perfectly Uniform) ==== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff !important; border-radius: 10px; border: none;
  cursor: pointer; text-decoration: none; font-weight: 800; transition: 0.2s;
  padding: 8px 18px; font-size: 13px; height: 38px;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn.ghost { background: var(--panel); border: 1px solid var(--panel-border); color: var(--text) !important; box-shadow: none; }
#btnSearch { height: 46px; border-radius: 14px; padding: 0 25px; font-size: 14px; }

/* THEME TOGGLE WRAPPER */
.header-right .theme-toggle { display: flex; align-items: center; }
.header-right #themeBtn { min-width: 100px; } /* Ensures button has room for text */

/* ==== CARDS ==== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 15px; }
.card { 
  position: relative; display: flex; gap: 14px; background: var(--panel); border-radius: 20px; 
  padding: 14px; border: 1px solid var(--panel-border); box-shadow: var(--shadow);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); min-height: 110px;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .cover { width: 85px; height: 85px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.card .meta { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card .title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; margin-bottom: 2px; }
.card .muted { font-size: 13px; opacity: 0.6; }
.card .actions { margin-top: 10px; display: flex; gap: 6px; }

.explicit-badge { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; z-index: 5; }

/* ==== PAGINATION ==== */
.pager-wrap { display: flex; justify-content: center; gap: 6px; margin-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.pager-wrap .btn { min-width: 40px; background: var(--panel); color: var(--text) !important; border: 1px solid var(--panel-border); padding: 8px; box-shadow: none; }
.pager-wrap .btn.active { background: var(--accent); color: #fff !important; border-color: var(--accent); }

/* ==== MODALS ==== */
.modal, .ban-overlay, #requestModal {
  position: fixed !important; inset: 0 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  z-index: 99999 !important;
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.modal__sheet, .ban-modal-content, .modal-content {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 28px; padding: 35px; width: min(480px, 92vw); text-align: center;
  position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); color: var(--text);
}
.modal__close { position: absolute; right: 20px; top: 20px; font-size: 28px; border: none; background: transparent; color: var(--text); cursor: pointer; opacity: 0.6; }

/* GENRE CHIPS */
.quick-filters-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 25px; }
.filter-btn { padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 800; border: 1px solid var(--panel-border); cursor: pointer; transition: 0.2s; }

/* STATUS ELEMENTS */
.hidden { display: none !important; }
.alert-paused { background: var(--danger); color: #fff; padding: 12px; border-radius: 12px; text-align: center; margin-bottom: 20px; font-weight: 800; }
.partners { text-align: center; margin-top: 40px; }
.partners img { border-radius: 18px; margin: 0 10px; width: 85px; }

@media (max-width: 600px) {
  .header-title { font-size: 1.8rem; position: static; transform: none; margin: 15px 0 !important; }
  .header { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .search-row { flex-direction: column; }
}