/* Modern Light Theme Variables for Navigation Page - 2025 - Warm Natural */
.navigation-page {
  --bg-primary: #fefdfb;
  --bg-secondary: #faf9f7;
  --bg-tertiary: #f5f3f0;
  --bg-card: #fefdfb;

  /* Surface Colors - Natural warm surfaces */
  --surface-primary: rgba(139, 92, 246, 0.06);
  --surface-secondary: rgba(139, 92, 246, 0.09);
  --surface-tertiary: rgba(139, 92, 246, 0.12);
  --surface-hover: rgba(139, 92, 246, 0.15);
  --surface-active: rgba(139, 92, 246, 0.18);

  /* Premium Text Colors (Warm and natural) */
  --text-primary: #1a1612;
  --text-secondary: #44403c;
  --text-tertiary: #57534e;
  --text-quaternary: #78716c;
  --text-muted: #a8a29e;
  --text-disabled: #d6d3d1;

  /* Modern Accent Colors - Purple & Warm focused */
  --accent-primary: #8b5cf6;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #6d28d9;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;
  --accent-orange: #f97316;

  /* Modern Gradients - warm natural theme */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --gradient-accent: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  --gradient-bg: linear-gradient(135deg, #fefdfb 0%, #faf9f7 50%, #f5f3f0 100%);

  /* Modern Glass Effects - warm theme */
  --glass-bg: rgba(254, 253, 251, 0.85);
  --glass-border: rgba(139, 92, 246, 0.15);
  --glass-hover: rgba(250, 249, 247, 0.95);

  /* Modern Shadow System - warm natural theme */
  --shadow-xs: 0 1px 2px rgba(26, 22, 18, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 22, 18, 0.08), 0 1px 2px rgba(26, 22, 18, 0.04);
  --shadow-md: 0 4px 6px rgba(26, 22, 18, 0.06), 0 2px 4px rgba(26, 22, 18, 0.04);
  --shadow-lg: 0 10px 15px rgba(26, 22, 18, 0.08), 0 4px 6px rgba(26, 22, 18, 0.03);
  --shadow-xl: 0 20px 25px rgba(26, 22, 18, 0.08), 0 10px 10px rgba(26, 22, 18, 0.02);
  --shadow-2xl: 0 25px 50px rgba(26, 22, 18, 0.12);
  --shadow-premium: 0 40px 60px -20px rgba(26, 22, 18, 0.15);

  /* Modern Glow Effects - violet theme */
  --glow-subtle: 0 0 24px rgba(139, 92, 246, 0.12);
  --glow-accent: 0 0 32px rgba(139, 92, 246, 0.16);
  --glow-premium: 0 0 40px rgba(139, 92, 246, 0.2);

  /* Premium Animation Easing */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Page background */
.navigation-page {
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Layout */
.navigation-container {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
}

/* Sidebar */
.nav-sidebar {
  width: 320px;
  position: sticky;
  top: 10px;
  height: fit-content;
  height: calc(100vh - 20px);
  background: var(--bg-card);
  border-radius: 28px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--glass-border);
  transition: all 0.6s var(--ease-out-quart);
}

.nav-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.06) 0%,
    rgba(124, 58, 237, 0.02) 100%
  );
  border-radius: 28px;
  pointer-events: none;
  z-index: -1;
}

.nav-sidebar .sidebar-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 8px;
}

.nav-sidebar .sidebar-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search */
.nav-sidebar .search-container {
  padding: 0 24px 16px 24px;
  margin-bottom: 8px;
  position: relative;
  display: flex;
  align-items: center;
}

#nav-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-secondary);
  font-family: var(--ff);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all 0.3s var(--ease-out-quart);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

#nav-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--glass-hover);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12), var(--glow-subtle);
}

#nav-search-input::placeholder {
  color: var(--text-muted);
}

#nav-search-button {
  position: absolute;
  right: 32px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#nav-search-button:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* Category list */
#nav-category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 24px 24px;
  flex: 1;
  overflow-y: auto;
}

.nav-category-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--ff);
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--text-secondary);
  background: transparent;
  border: none !important;
  transition: all 0.3s var(--ease-out-quart);
  letter-spacing: 0.025em;
  margin-bottom: 4px;
}

.nav-category-btn:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.25);
  outline-offset: 2px;
}

.nav-category-btn:not(.active):hover {
  transform: translateX(4px);
  background: var(--glass-hover);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md), var(--glow-subtle);
  color: var(--text-primary);
}

.nav-category-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-lg), var(--glow-subtle);
  border: 1px solid transparent;
  transform: translateX(2px) scale(1.01);
}

.nav-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--bg-primary);
  background: var(--accent-primary);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  margin-left: auto;
  font-weight: 700;
  transition: all 0.3s ease;
  transform: scale(0.95);
  box-shadow: var(--glow-subtle);
}

.nav-category-btn.active .nav-category-count {
  background: var(--bg-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* Main content */
.nav-main {
  width: 1200px;
  position: relative;
  z-index: 1;
  padding: 64px 72px;
  border-radius: 32px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(40px);
  transition: all 0.6s var(--ease-out-quart);
  border: 1px solid var(--glass-border);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.06) 0%,
    rgba(124, 58, 237, 0.02) 100%
  );
}

/* Header */
.nav-main header {
  text-align: center;
  padding-bottom: 32px;
  margin-bottom: 40px;
  position: relative;
}

.nav-main header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: var(--glow-subtle);
}

.nav-main header h1 {
  margin: 0 0 16px 0 !important;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  position: relative;
  display: inline-block;
  color: var(--text-primary);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s var(--ease-spring);
  cursor: pointer;
  user-select: none;
  max-width: 80%;
}

.nav-main header h1:hover {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
}

.nav-main header p {
  font-size: 1rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Grid */
#nav-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* Category section */
.category-section {
  grid-column: 1 / -1;
  margin: 32px 0 16px 0;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-left: 20px;
  margin-bottom: 16px;
}

.category-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: var(--glow-subtle);
}

/* Website card - Minimalist Design */
.website-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.website-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

/* Card header */
.website-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.website-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-right: 16px;
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-primary);
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.website-card:hover .website-icon {
  background: var(--surface-hover);
  border-color: var(--accent-primary);
}

/* Card info */
.website-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.website-info h3::before {
  content: none;
}

.website-info .website-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  word-break: break-all;
  line-height: 1.2;
}

/* Card body */
.website-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 16px 0;
}

/* Tags */
.website-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.website-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface-secondary);
  color: var(--accent-primary);
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.55;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-tertiary);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--glass-border);
  border-top: 4px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: var(--glow-subtle);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Home/To-top buttons */
.navigation-page .home-button {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glow-subtle);
}

.navigation-page .home-button::before {
  background: var(--gradient-primary);
}

.navigation-page .home-button:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-2xl), var(--glow-subtle);
}

.navigation-page .home-button:hover svg {
  filter: drop-shadow(0 0 12px rgba(79, 70, 229, 0.5));
}

.navigation-page .to-top {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glow-subtle);
}

.navigation-page .to-top::before {
  background: var(--gradient-primary);
}

.navigation-page .to-top:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-2xl), var(--glow-subtle);
}

/* Scrollbar (sidebar list only) */
#nav-category-list::-webkit-scrollbar {
  width: 6px;
}

#nav-category-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
  margin: 4px 0;
}

#nav-category-list::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: var(--glow-subtle);
}

#nav-category-list::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
  box-shadow: var(--glow-subtle);
}

/* Interactions */
.website-card:active {
  transform: translateY(-2px) scale(0.985);
  transition-duration: 0.1s;
}

.website-card:focus {
  outline: 2px solid rgba(79, 70, 229, 0.25);
  outline-offset: 4px;
}

/* Focus ring consistency */
.navigation-page .home-button:focus-visible,
.navigation-page .to-top:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.25);
  outline-offset: 4px;
}
