@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #030712;
  --bg-gradient: radial-gradient(ellipse 65% 55% at 50% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 20%, rgba(20, 184, 166, 0.08), transparent 50%),
    linear-gradient(180deg, #030712 0%, #090d16 50%, #030712 100%);
  --surface: #0b0f19;
  --surface-soft: #111827;
  --surface-dark: rgba(11, 15, 25, 0.82);
  --border: rgba(255, 255, 255, 0.07);
  --border-dark: rgba(255, 255, 255, 0.08);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --ink: #f9fafb;
  --ink-muted: #9ca3af;
  --accent-blue: #0ea5e9;
  --accent-purple: #635bff;
  --accent-pink: #e4478f;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --glass-blur: blur(20px);
  --glass-bg-dark: rgba(11, 15, 25, 0.45);
  --glass-bg-light: rgba(255, 255, 255, 0.45);
  --glass-border-dark: rgba(255, 255, 255, 0.08);
  --glass-border-light: rgba(15, 23, 42, 0.06);
  --glass-bg: var(--glass-bg-dark);
  --glass-border: var(--glass-border-dark);
  --glass-border-focus: rgba(99, 102, 241, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --cat-education: #4285F4;
  --cat-wellness: #FF9F1C;
  --cat-gaming: #FA5C5C;
  --cat-development: #F48024;
  --cat-design: #F24E1E;
  --cat-ai-tools: #10a37f;
  --cat-productivity: #7B68EE;
  --cat-finance: #00B386;
  --cat-favorites: #e4478f;
}

body[data-theme="light"] {
  --bg-color: #f9fafb;
  --bg-gradient: radial-gradient(ellipse 60% 45% at 50% -10%, rgba(99, 91, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #f9fafb 0%, #f3f4f6 60%, #ffffff 60%, #ffffff 100%);
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --surface-dark: rgba(255, 255, 255, 0.88);
  --border: rgba(0, 0, 0, 0.06);
  --border-dark: rgba(0, 0, 0, 0.07);
  --text-main: #0f172a;
  --text-muted: #4b5563;
  --glass-bg: var(--glass-bg-light);
  --glass-border: var(--glass-border-light);
  --ink: #0f172a;
  --ink-muted: #4b5563;
  --cat-education: #1a73e8;
  --cat-wellness: #e67e22;
  --cat-gaming: #d9534f;
  --cat-development: #d97706;
  --cat-design: #c2410c;
  --cat-ai-tools: #0f766e;
  --cat-productivity: #5b21b6;
  --cat-finance: #047857;
  --cat-favorites: #be185d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0b1020;
}

body[data-theme="light"] ::-webkit-scrollbar-track {
  background: #e8edf2;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border: 2px solid #0b1020;
  border-radius: 999px;
}

body[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border: 2px solid #e8edf2;
}

.text-glass-primary,
.text-glass-secondary,
.text-glass-muted {
  color: inherit;
  text-shadow: none;
  letter-spacing: 0;
}

.nav-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(10, 16, 32, 0.78);
  border-bottom: 1px solid var(--border-dark);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body[data-theme="light"] .nav-header {
  background: rgba(255, 255, 255, 0.82);
}

.nav-container {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.logo-icon {
  width: 26px;
  height: 26px;
  fill: var(--accent-blue);
  filter: drop-shadow(0 8px 14px rgba(14, 165, 233, 0.28));
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
}

.nav-link,
.theme-toggle-btn {
  min-height: 40px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

body[data-theme="light"] .nav-link:hover {
  background: var(--surface-soft);
}

.nav-btn {
  margin-left: 0.25rem;
  color: #fff;
  background: var(--accent-purple);
  border: 1px solid transparent;
}

.nav-btn:hover {
  color: #fff;
  background: #5148f0;
}

.theme-toggle-btn {
  width: 40px;
  border: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-wrapper {
  position: relative;
  width: 100%;
  padding: 6rem 0 8rem;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
}

body[data-theme="light"] .hero-wrapper {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
}

.hero-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, transparent 35%, var(--bg-color) 100%);
  z-index: 1;
}

.hero-split-grid {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-left {
  min-width: 0;
}

.hero-badge,
.bento-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-theme="light"] .hero-badge,
body[data-theme="light"] .bento-badge {
  color: #344054;
  background: rgba(255, 255, 255, 0.76);
}

.hero-title {
  max-width: 820px;
  margin: 1.25rem 0 1.1rem;
  color: #f8fafc;
  font-size: clamp(2.65rem, 5.4vw, 4.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  transition: color 0.25s;
}

body[data-theme="light"] .hero-title {
  color: #0f172a;
}

.hero-title .gradient-text {
  color: #80d7ff;
  background: linear-gradient(90deg, #80d7ff 0%, #b8a7ff 48%, #f58ab7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-theme="light"] .hero-title .gradient-text {
  background: linear-gradient(90deg, #0284c7 0%, #4f46e5 50%, #db2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 710px;
  margin-bottom: 2rem;
  color: #a8b4c7;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.75;
  transition: color 0.25s;
}

body[data-theme="light"] .hero-subtitle {
  color: #475569;
}

.search-container {
  position: relative;
  z-index: 10;
  width: min(100%, 820px);
  margin-bottom: 1.15rem;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 66px;
  padding: 0.5rem;
  padding-left: 1.15rem;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body[data-theme="light"] .search-box {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.search-box:focus-within {
  border-color: var(--glass-border-focus);
}

.search-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--accent-blue);
  margin-right: 0.75rem;
}

.search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 550;
}

body[data-theme="light"] .search-input {
  color: var(--ink);
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}

.search-clear-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-main);
}

.search-button,
.accent-btn {
  min-height: 44px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0ea5e9 0%, #635bff 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-button {
  padding: 0 1.25rem;
}

.search-button svg {
  width: 18px;
  height: 18px;
}

.search-button:hover,
.accent-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(99, 91, 255, 0.24);
  filter: brightness(1.04);
}

.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}

body[data-theme="light"] .suggestions-dropdown {
  background: #fff;
  border-color: var(--border);
}

.suggestions-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.suggestions-section {
  padding: 0.55rem;
}

.suggestions-section-title {
  padding: 0.55rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-main);
  cursor: pointer;
}

body[data-theme="light"] .suggestion-item {
  color: var(--ink);
}

.suggestion-item:hover {
  background: rgba(14, 165, 233, 0.1);
}

.suggestion-item-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.suggestion-item-text {
  font-size: 0.9rem;
  font-weight: 650;
}

.suggestion-item-category {
  margin-left: auto;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.trending-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trending-label {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 650;
  margin-right: 0.2rem;
}

.tag,
.tab-btn,
.action-btn,
.card-details-btn {
  min-height: 36px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tag,
.tab-btn {
  padding: 0 0.85rem;
}

.tag:hover,
.tab-btn:hover,
.tab-btn.active,
.action-btn:hover,
.card-details-btn:hover {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.12);
  color: var(--text-main);
}

.hero-right {
  min-width: 0;
}

.featured-bento-card {
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(16, 23, 42, 0.6);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(1.35rem, 2.2vw, 2rem);
}

body[data-theme="light"] .featured-bento-card {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.1);
}

#featured-platform-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#featured-platform-details .card-header {
  align-items: center;
}

#featured-platform-details .card-title {
  color: var(--text-main);
  font-size: 1.55rem;
}

#featured-platform-details .card-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 4.5rem 0;
  color: var(--ink);
}

.section-container[style*="display: none"] {
  display: none !important;
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 2rem;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
}

.directory-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.directory-stats {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.tabs-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-btn,
.action-btn,
.card-details-btn {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.tab-btn.active,
.card-details-btn:hover {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
}

.recommendations-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.website-card {
  position: relative;
  min-width: 0;
  min-height: 292px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Glass Glare Highlight Overlays */
.glare-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle 120px at var(--mouse-x, 0) var(--mouse-y, 0), var(--glare-color, rgba(255, 255, 255, 0.08)), transparent 100%);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.website-card:hover .glare-overlay,
.featured-bento-card:hover .glare-overlay {
  opacity: 1;
}

body[data-theme="light"] {
  --glare-color: rgba(15, 23, 42, 0.04);
}

.website-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(var(--brand-color-rgb, 99, 102, 241), 0.4);
  box-shadow: 0 20px 40px rgba(var(--brand-color-rgb, 99, 102, 241), 0.12), var(--shadow-md);
}

.compare-checkbox-wrapper {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.compare-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.card-logo-container {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #101828;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo,
.brand-vector {
  width: 28px;
  height: 28px;
  display: block;
}

.card-title-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.card-title {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.22;
  padding-right: 1.8rem;
  word-break: break-word;
}

.card-category {
  color: var(--brand-color, var(--accent-blue));
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-desc {
  color: var(--ink-muted);
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.62;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stat-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-label {
  color: var(--ink-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-val {
  min-width: 0;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-icon {
  width: 12px;
  height: 12px;
}

.glass-status-good,
.glass-status-moderate,
.glass-status-severe {
  border: 1px solid transparent !important;
}

.glass-status-good {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #34d399 !important;
}

.glass-status-moderate {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
}

.glass-status-severe {
  background: rgba(248, 113, 113, 0.15) !important;
  color: #f87171 !important;
}

body[data-theme="light"] .glass-status-good {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #047857 !important;
}

body[data-theme="light"] .glass-status-moderate {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #a16207 !important;
}

body[data-theme="light"] .glass-status-severe {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #b91c1c !important;
}

.comparison-grid-wrapper,
.guide-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.comparison-grid-wrapper {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.comparison-empty-state {
  padding: 3rem 1rem;
  color: var(--ink-muted);
  text-align: center;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.9rem;
  vertical-align: top;
}

.comparison-table th {
  font-weight: 800;
  background: var(--surface-soft);
}

.comparison-table td:first-child {
  width: 190px;
  color: var(--ink-muted);
  font-weight: 800;
}

.floating-compare-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 100;
  width: 100%;
  transform: translateY(105%);
  border-top: 1px solid var(--border-dark);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 -16px 38px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.28s ease;
}

.floating-compare-bar.active {
  transform: translateY(0);
}

body[data-theme="light"] .floating-compare-bar {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: var(--border);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
}

body[data-theme="light"] .compare-bar-text {
  color: var(--ink);
}

.compare-bar-container {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.compare-bar-left,
.compare-bar-right,
.compare-bar-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compare-count-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 850;
}

.compare-bar-text {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.compare-bar-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.guide-container {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.guide-heading {
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
}

.accordion {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.accordion-item,
.quiz-panel,
.exercise-panel,
.review-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.accordion-header {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: left;
}

.accordion-icon {
  color: var(--accent-purple);
  font-size: 1.1rem;
  font-weight: 800;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.accordion-item.active .accordion-content {
  padding: 0 1rem 1rem;
}

.guide-interactive-actions,
.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.quiz-panel,
.exercise-panel {
  margin-top: 1rem;
  padding: 1.25rem;
}

.quiz-title,
.exercise-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.quiz-options {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.quiz-option {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 650;
}

.quiz-option:hover {
  border-color: rgba(14, 165, 233, 0.5);
}

.quiz-option.correct,
.quiz-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.quiz-option.incorrect,
.quiz-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.quiz-feedback {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 650;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 2rem;
}

.modal-left,
.modal-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-right {
  border-left: 1px solid var(--border) !important;
  padding-left: 1.5rem !important;
}

.sparkline-svg {
  width: 100%;
  height: 118px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.sparkline-path {
  fill: none;
  stroke: var(--brand-color, var(--accent-blue));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.sparkline-dots circle {
  fill: #fff;
  stroke: var(--brand-color, var(--accent-blue));
  stroke-width: 2.5;
}

.reviews-scroller {
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 0.75rem;
  padding-right: 0.4rem;
}

.review-item {
  padding: 0.85rem;
}

.review-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 750;
  margin-bottom: 0.35rem;
}

.review-content {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.rating-selector {
  display: flex;
  gap: 0.35rem;
}

.rating-star {
  color: #d0d5dd;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rating-star.selected,
.rating-star.hovered {
  color: #f59e0b;
  transform: scale(1.08);
}

textarea#review-comment-input {
  background: var(--surface-soft) !important;
  border: 1px solid var(--border) !important;
  color: var(--ink) !important;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: grid;
  gap: 0.7rem;
  pointer-events: none;
}

.toast {
  width: min(380px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-blue);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: slideIn 0.22s ease forwards;
}

.toast.toast-exit {
  animation: slideOut 0.22s ease forwards;
}

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

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

.footer-container {
  margin-top: 3rem;
  padding: 3rem 0 2rem;
  color: var(--ink);
  background: #fff;
  border-top: 1px solid var(--border);
}

.footer-content,
.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: grid;
  gap: 0.45rem;
}

.footer-desc,
.footer-bottom,
.footer-link {
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-link {
  text-decoration: none;
  font-weight: 700;
}

.footer-link:hover {
  color: var(--ink);
}

.footer-bottom {
  margin-top: 1.75rem;
  opacity: 0.72;
}

@media (max-width: 1060px) {
  .nav-container,
  .hero-wrapper,
  .section-container,
  .compare-bar-container,
  .footer-content,
  .footer-bottom {
    width: min(100% - 32px, 1180px);
  }

  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-left {
    max-width: 760px;
  }

  .featured-bento-card {
    min-height: auto;
  }

  .recommendations-grid,
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background-image: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 26%), linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 38%, var(--bg-color) 38%, var(--bg-color) 100%);
  }

  .nav-container {
    min-height: auto;
    padding: 0.8rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 0.15rem;
  }

  .nav-link {
    flex: 0 1 auto;
  }

  .nav-btn {
    flex: 1 1 150px;
  }

  .hero-wrapper {
    padding: 2.8rem 0 3rem;
  }

  .hero-title {
    font-size: clamp(2.1rem, 9vw, 3.1rem);
  }

  .search-box {
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 0.65rem;
  }

  .search-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .trending-container {
    align-items: flex-start;
  }

  .directory-meta-row,
  .compare-bar-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs-container {
    justify-content: flex-start;
  }

  .recommendations-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .card-stats {
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-right {
    border-left: 0 !important;
    border-top: 1px solid var(--border);
    padding-left: 0 !important;
    padding-top: 1.25rem;
  }
}

@media (max-width: 430px) {
  .nav-container,
  .hero-wrapper,
  .section-container,
  .compare-bar-container,
  .footer-content,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 1.05rem;
  }

  .hero-title {
    line-height: 1.02;
    font-size: clamp(2rem, 8.7vw, 2.55rem);
  }

  .search-box {
    padding-left: 0.9rem;
  }

  .modal-overlay {
    padding: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================
   10. INTERACTIVE SVG MIND MAP & EXERCISE UX
   ========================================== */
.mind-map-wrapper {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mind-map-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  text-align: center;
}

.mindmap-view-container {
  width: 100%;
  overflow-x: auto;
}

.mind-map-canvas-container {
  position: relative;
  width: 100%;
  min-width: 700px;
  height: 300px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

body[data-theme="light"] .mind-map-canvas-container {
  background: #e2e8f0;
}

body[data-theme="light"] .mind-map-node:not(.active) {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mind-map-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.mind-map-nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.mind-map-node {
  position: absolute;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s, 
              box-shadow 0.25s,
              background-color 0.25s;
  user-select: none;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.mind-map-node:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(99, 91, 255, 0.3);
}

.mind-map-node.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 20px rgba(99, 91, 255, 0.5);
}

.mind-map-path {
  fill: none;
  stroke: rgba(99, 91, 255, 0.35);
  stroke-width: 2.5;
  stroke-dasharray: 4 4;
  animation: mindMapDash 30s linear infinite;
}

@keyframes mindMapDash {
  to {
    stroke-dashoffset: -1000;
  }
}

.mind-map-preview {
  margin-top: 1.25rem;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: mindMapFadeIn 0.3s ease-out;
}

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

.mind-map-preview h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.mind-map-preview p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Practical Challenge Interactive Verification Styles */
.exercise-interaction-area {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.exercise-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.exercise-textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.exercise-textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

#exercise-submit-btn {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 1.25rem;
}

.exercise-feedback {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  animation: mindMapFadeIn 0.3s ease-out;
}

.exercise-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.exercise-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Premium Features Extensions */
.sort-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.5rem 1.8rem 0.5rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.45)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.9rem;
}
.sort-select:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
body[data-theme="light"] .sort-select {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(15,23,42,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

.favorite-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.favorite-btn:hover {
  transform: scale(1.2);
  color: #ef4444;
}
.favorite-btn.active {
  color: #ef4444;
}

/* Completed Mind Map Node styling */
.mind-map-node.completed {
  border-color: #10a37f !important;
  box-shadow: 0 0 12px rgba(16, 163, 127, 0.4) !important;
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.2), rgba(16, 163, 127, 0.05)) !important;
}
.mind-map-node.completed::after {
  content: " ✓";
  color: #10a37f;
  font-weight: bold;
}
.mind-map-path.completed {
  stroke: #10a37f !important;
  stroke-dasharray: 4;
  animation: dash 30s linear infinite;
}
@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Stepper indicators active styling */
.step-indicator.active {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}
.step-indicator.completed {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: #fff !important;
}

/* Autocomplete Highlight styles */
.highlight-match {
  color: var(--accent-blue);
  font-weight: 800;
  text-shadow: 0 0 6px rgba(14, 165, 233, 0.2);
}

/* Slide-out admin moderation drawer styles */
.moderation-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  justify-content: flex-end;
}
.moderation-drawer {
  width: min(440px, 100%);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.mod-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mod-action-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}
.mod-action-btn.approve:hover {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.mod-action-btn.delete:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* ==========================================
   NEW STYLES: Category Explorer, Logos, Infinite Scroll
   ========================================== */

/* Category Explorer Grid */
.category-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.category-explorer-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-sm);
}

.category-explorer-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(var(--cat-color-rgb, 99, 102, 241), 0.4);
  box-shadow: 0 12px 28px rgba(var(--cat-color-rgb, 99, 102, 241), 0.08), var(--shadow-md);
}

.cat-explorer-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
}

.cat-explorer-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.cat-explorer-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.cat-explorer-count {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.cat-explorer-arrow {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}

.category-explorer-card:hover .cat-explorer-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

/* Brand Logo Images from Clearbit */
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
  transition: transform 0.2s ease;
}

.card-logo-container:hover .brand-logo-img {
  transform: scale(1.08);
}

.lettermark-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  font-size: 14px;
}

/* Infinite Scroll End Message */
#infinite-scroll-end {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Responsive adjustments for category explorer */
@media (max-width: 1060px) {
  .category-explorer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .category-explorer-grid {
    grid-template-columns: 1fr;
  }
  .category-explorer-card {
    padding: 1rem;
  }
}

/* AI Layout Selection Styling */
.layout-toggle-container {
  display: flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.25rem;
  gap: 0.15rem;
}

.layout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.layout-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.layout-btn.active {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.25);
}

body[data-theme="light"] .layout-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .layout-btn.active {
  background: var(--accent-purple);
  color: #fff;
}

/* Spreadsheet Table Styling */
.spreadsheet-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.spreadsheet-table tr {
  transition: background-color 0.2s;
}

.spreadsheet-table tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

body[data-theme="light"] .spreadsheet-table tr:hover {
  background: rgba(0, 0, 0, 0.01);
}

.spreadsheet-table-name {
  font-weight: 700;
  color: var(--text-main);
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category Mind Map Path Animation */
.mind-map-path.completed {
  stroke: var(--accent-blue);
  stroke-dasharray: 8;
  animation: mindMapDash 30s linear infinite;
}

@keyframes mindMapDash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Floating AI Companion Widget */
.ai-copilot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(123, 104, 238, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  color: #fff;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-copilot-trigger:hover {
  transform: scale(1.15) rotate(8deg);
}

.ai-copilot-trigger .pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  opacity: 0.8;
  animation: copilotPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes copilotPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.ai-copilot-panel {
  position: fixed;
  top: 80px;
  right: -380px;
  width: 350px;
  height: calc(100vh - 110px);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 0 0 20px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ai-copilot-panel.active {
  pointer-events: auto;
}

.ai-copilot-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-copilot-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-copilot-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.ai-message.bot {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-message.user {
  background: var(--accent-purple);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.2);
}

.ai-chat-input-row {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.3);
}

.ai-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  outline: none;
  font-family: var(--font-sans);
}

.ai-chat-send {
  background: var(--accent-blue);
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.25);
  transition: transform 0.2s;
}

.ai-chat-send:active {
  transform: scale(0.95);
}


