/* ==========================================================================
   Bioinformatics Tools Navigator - Global & Theme Stylesheet
   ========================================================================== */

:root {
  --bg-primary: #F0F4F8;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #E1E7EE;
  --bg-input: #FFFFFF;
  --border-color: #D2DCE6;
  --border-subtle: #E8EEF5;
  --text-primary: #102A43;
  --text-secondary: #334E68;
  --text-muted: #627D98;
  --header-bg: rgba(240, 244, 248, 0.94);
  --accent-cyan: #06B6D4;
}

html.dark {
  --bg-primary: #0B132B;
  --bg-card: #1C2541;
  --bg-card-subtle: #222E4F;
  --bg-input: #151D34;
  --border-color: #2D3A63;
  --border-subtle: #202B4B;
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --header-bg: rgba(11, 19, 43, 0.95);
  --accent-cyan: #06B6D4;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Custom smooth scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #BCCCDC;
  border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #314168;
}

::-webkit-scrollbar-thumb:hover {
  background: #829AB1;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #465B8F;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

/* ==================== THE TECH OCEAN: LIGHT MODE REFINEMENTS ==================== */
header {
  background-color: var(--header-bg) !important;
  border-color: var(--border-color) !important;
}

header h1 {
  color: var(--text-primary) !important;
}

header p {
  color: var(--text-secondary) !important;
}

/* ==================== THE TECH OCEAN: DARK MODE COMPONENT ELEVATION ==================== */

html.dark header {
  background-color: var(--header-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5) !important;
}

html.dark header h1 {
  color: #FFFFFF !important;
}

html.dark header p {
  color: #94A3B8 !important;
}

/* Navigation pill in header */
html.dark header #views-nav-container,
html.dark header .bg-slate-100 {
  background-color: #121A33 !important;
  border-color: var(--border-color) !important;
}

html.dark header #views-nav-container button {
  color: #94A3B8;
}

html.dark header #views-nav-container button:hover {
  color: #22D3EE !important;
}

/* Active tab in dark mode */
html.dark header #views-nav-container button[class*="bg-white"],
html.dark header #views-nav-container button[class*="bg-[#222E4F]"] {
  background-color: #222E4F !important;
  color: #22D3EE !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Sidebar styling */
html.dark aside > div {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45) !important;
}

html.dark aside h2 {
  color: #F8FAFC !important;
  letter-spacing: 0.05em;
}

html.dark aside label {
  color: #CBD5E1 !important;
}

html.dark aside .border-t,
html.dark aside .border-b {
  border-color: var(--border-subtle) !important;
}

/* Filter buttons inside sidebar */
.filter-btn {
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

html.dark .filter-btn {
  background-color: #1C2541;
  color: #E2E8F0 !important;
  border-color: #3B4C7A !important;
}

html.dark .filter-btn:hover {
  background-color: #263359 !important;
  border-color: #06B6D4 !important;
  color: #FFFFFF !important;
}

html.dark .filter-btn.shadow-md,
html.dark .filter-btn[class*="bg-cyan-500"],
html.dark .filter-btn[class*="bg-indigo-600"] {
  background-color: #06B6D4 !important;
  border-color: #22D3EE !important;
  color: #0B132B !important;
  font-weight: 700 !important;
}

/* Results top bar & table container */
html.dark .bg-white {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

html.dark #results-count {
  background-color: rgba(6, 182, 212, 0.12) !important;
  color: #22D3EE !important;
  border-color: rgba(6, 182, 212, 0.35) !important;
  font-weight: 600;
}

html.dark #pagination-bar {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

html.dark #pagination-info {
  color: #94A3B8 !important;
}

html.dark #pagination-buttons button {
  background-color: #151D34 !important;
  border-color: var(--border-color) !important;
  color: #CBD5E1 !important;
}

html.dark #pagination-buttons button:hover {
  background-color: #222E4F !important;
  color: #FFFFFF !important;
}

html.dark footer {
  background-color: #070D1F !important;
  border-color: var(--border-color) !important;
}

html.dark footer p {
  color: #94A3B8 !important;
}

html.dark footer span {
  color: #CBD5E1 !important;
}

/* Form inputs and select dropdowns */
html.dark input[type="text"],
html.dark select,
html.dark textarea {
  background-color: var(--bg-input) !important;
  border-color: var(--border-color) !important;
  color: #F8FAFC !important;
}

html.dark input[type="text"]:focus,
html.dark select:focus,
html.dark textarea:focus {
  border-color: #06B6D4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748B !important;
}

/* ==================== TOOL CARDS IN DARK MODE (TECH OCEAN) ==================== */
html.dark #tools-container > div {
  background: linear-gradient(180deg, #1C2541 0%, #151D34 100%) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.45) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark #tools-container > div:hover {
  border-color: #06B6D4 !important;
  box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.6), 0 0 18px -2px rgba(6, 182, 212, 0.25) !important;
  transform: translateY(-2px);
}

html.dark #tools-container h3 {
  color: #FFFFFF !important;
  font-weight: 700;
}

html.dark #tools-container > div:hover h3 {
  color: #67E8F9 !important;
}

html.dark #tools-container p {
  color: #CBD5E1 !important;
}

html.dark #tools-container .border-t {
  border-color: var(--border-subtle) !important;
}

/* Pipeline Stage Pill on Cards */
.card-stage-pill {
  transition: all 0.15s ease-in-out;
}

html.dark .card-stage-pill,
html.dark #tools-container .card-stage-pill,
html.dark #tools-container .bg-slate-100 {
  background-color: #121A33 !important;
  color: #E2E8F0 !important;
  border: 1px solid #3B4C7A !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Reaction Buttons on Cards */
html.dark .card-reaction-btn {
  background-color: #151D34 !important;
  border-color: var(--border-color) !important;
  color: #CBD5E1 !important;
}

html.dark .card-reaction-btn:hover {
  background-color: #222E4F !important;
  border-color: #06B6D4 !important;
  color: #FFFFFF !important;
}

html.dark .card-reaction-btn .count-badge {
  background-color: #0E1424 !important;
  border-color: #263359 !important;
  color: #94A3B8 !important;
}

html.dark .card-reaction-btn[id*="comments"] {
  background-color: rgba(6, 182, 212, 0.12) !important;
  border-color: rgba(6, 182, 212, 0.35) !important;
  color: #67E8F9 !important;
}

html.dark .card-reaction-btn[id*="comments"]:hover {
  background-color: rgba(6, 182, 212, 0.25) !important;
  border-color: #06B6D4 !important;
  color: #FFFFFF !important;
}

html.dark .card-reaction-btn[id*="comments"] .count-badge {
  background-color: #0B132B !important;
  border-color: rgba(6, 182, 212, 0.45) !important;
  color: #22D3EE !important;
}

/* Card SOP inspect button */
html.dark #tools-container button.bg-slate-100 {
  background: linear-gradient(135deg, #222E4F, #151D34) !important;
  color: #E2E8F0 !important;
  border: 1px solid var(--border-color) !important;
}

html.dark #tools-container button.bg-slate-100:hover {
  background: linear-gradient(135deg, #0891B2, #06B6D4) !important;
  border-color: #06B6D4 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35) !important;
}

/* Card Species Tags */
html.dark #tools-container span.bg-slate-100 {
  background-color: #151D34 !important;
  color: #CBD5E1 !important;
  border-color: var(--border-subtle) !important;
}

/* Card Assay Badge */
html.dark #tools-container .bg-purple-50 {
  background-color: rgba(147, 51, 234, 0.18) !important;
  color: #D8B4FE !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}

/* Platform Tag Badges in Dark Mode */
html.dark .bg-blue-50 {
  background-color: rgba(37, 99, 235, 0.18) !important;
  color: #93C5FD !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}

html.dark .bg-emerald-50 {
  background-color: rgba(5, 150, 105, 0.18) !important;
  color: #6EE7B7 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html.dark .bg-amber-50 {
  background-color: rgba(217, 119, 6, 0.18) !important;
  color: #FCD34D !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html.dark .bg-purple-50 {
  background-color: rgba(147, 51, 234, 0.18) !important;
  color: #D8B4FE !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}

html.dark .bg-rose-50 {
  background-color: rgba(225, 29, 72, 0.18) !important;
  color: #FDA4AF !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

html.dark .bg-cyan-50 {
  background-color: rgba(6, 182, 212, 0.18) !important;
  color: #67E8F9 !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
}

html.dark .bg-orange-50 {
  background-color: rgba(234, 88, 12, 0.18) !important;
  color: #FDBA74 !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}

/* Table View in Dark Mode */
html.dark #tools-table-container {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

html.dark #tools-table-container thead {
  background-color: #121A33 !important;
  border-color: var(--border-color) !important;
}

html.dark #tools-table-container th {
  color: #94A3B8 !important;
}

html.dark #tools-table-body tr {
  border-color: var(--border-subtle) !important;
}

html.dark #tools-table-body tr:hover {
  background-color: rgba(6, 182, 212, 0.08) !important;
}

html.dark #tools-table-body td.text-slate-900 {
  color: #F8FAFC !important;
}

html.dark #tools-table-body td.text-slate-600,
html.dark #tools-table-body td.text-slate-500 {
  color: #94A3B8 !important;
}

/* Modals in Dark Mode */
html.dark #tool-modal .bg-white,
html.dark #comments-modal .bg-white {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

html.dark #tool-modal .bg-slate-50,
html.dark #comments-modal .bg-slate-50 {
  background-color: #151D34 !important;
  border-color: var(--border-color) !important;
}

html.dark #modal-desc,
html.dark #modal-assay,
html.dark #modal-species,
html.dark #modal-stage,
html.dark #modal-citation {
  color: #CBD5E1 !important;
}

html.dark #tool-modal .bg-indigo-50\/70 {
  background-color: rgba(6, 182, 212, 0.12) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
}

html.dark #tool-modal .bg-amber-50 {
  background-color: rgba(217, 119, 6, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #FED7AA !important;
}

html.dark .comment-card {
  background-color: #151D34 !important;
  border-color: var(--border-color) !important;
}

html.dark .comment-card span.font-bold {
  color: #F8FAFC !important;
}

html.dark .comment-card p {
  color: #CBD5E1 !important;
}

/* Blueprints & Citations views */
html.dark #blueprint-content .bg-white {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

html.dark #blueprint-content h3 {
  color: #F8FAFC !important;
}

html.dark #blueprint-content p {
  color: #CBD5E1 !important;
}

html.dark #blueprint-content .bg-slate-100 {
  background-color: #151D34 !important;
  border-color: var(--border-color) !important;
  color: #CBD5E1 !important;
}

html.dark #view-citations h2 {
  color: #F8FAFC !important;
}

html.dark #view-citations p {
  color: #94A3B8 !important;
}

html.dark #view-citations .border-b {
  border-color: var(--border-subtle) !important;
}

html.dark #citations-list-container > div {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

html.dark #citations-list-container span.font-bold {
  color: #FFFFFF !important;
}

html.dark #citations-list-container p {
  color: #CBD5E1 !important;
}

/* Button & Pill Common Base */
.card-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-width: 1px;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.card-reaction-btn:active {
  transform: scale(0.94);
}

.card-reaction-btn .count-badge {
  font-weight: 700;
  font-size: 0.625rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.375rem;
  background-color: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.8);
}

/* ==========================================================================
   Chanakya AI Button Styles - Harmonized with pubmed-searcher.pages.dev
   Rich amber-brown liquid glass tint with warm glow and sculpted border
   ========================================================================== */
.chanakya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(175, 105, 55, 0.95) 0%, rgba(100, 45, 25, 0.98) 100%) !important;
  color: #ffecd6 !important;
  border: 1px solid rgba(255, 200, 150, 0.45) !important;
  box-shadow: 
    inset 0 1px 1px rgba(255, 235, 210, 0.7),
    inset 0 -2px 4px rgba(30, 10, 5, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 12px rgba(180, 110, 70, 0.25) !important;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chanakya-btn:hover {
  background: linear-gradient(135deg, rgba(195, 120, 70, 0.98) 0%, rgba(120, 55, 32, 1) 100%) !important;
  border-color: rgba(255, 210, 170, 0.7) !important;
  box-shadow: 
    inset 0 1px 2px rgba(255, 240, 220, 0.9),
    inset 0 -2px 4px rgba(30, 10, 5, 0.4),
    0 8px 18px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(200, 130, 80, 0.45) !important;
  transform: translateY(-1px);
  color: #ffffff !important;
}

.chanakya-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 
    inset 0 2px 4px rgba(20, 5, 2, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.25) !important;
}


