/* ============================================
   COMPONENT STYLES
   ============================================ */

/* ============================================
   BADGES & INDICATORS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--hover-duration, 0.2s) ease;
}

.badge.win {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.badge.loss {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge.neutral {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Team color indicators */
.team-amber {
  color: #d97706;
  font-weight: 600;
  position: relative;
}

.team-sapphire {
  color: #2563eb;
  font-weight: 600;
  position: relative;
}

.team-amber::before,
.team-sapphire::before {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.team-amber::before {
  background: #d97706;
}

.team-sapphire::before {
  background: #2563eb;
}

/* ============================================
   CARD COMPONENTS
   ============================================ */

section.card {
  position: relative;
  background: var(--pico-card-background-color, #fff);
  border: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 80%, transparent);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

section.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pico-primary), color-mix(in oklab, var(--pico-primary) 70%, #ffffff));
  opacity: 0;
  transition: opacity var(--hover-duration, 0.2s) ease;
}

section.card:hover::before {
  opacity: 1;
}

section.card header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 40%, transparent);
}

section.card header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--pico-color);
}

section.card header p.muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

section.card footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 40%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */

.chip-button {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: start;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  min-height: 36px;
}

.chip-button:hover {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 25%, transparent);
  border-color: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 90%, transparent);
}

.chip-button:active {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 35%, transparent);
}

.chip-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.chip-button .chev {
  opacity: 0.7;
  font-size: 0.85em;
  transition: transform var(--hover-duration, 0.2s) ease;
}

.chip-button:hover .chev {
  transform: translateY(1px);
}

/* Primary chip button variant */
.chip-button.primary {
  background: var(--pico-primary);
  color: white;
  border-color: var(--pico-primary);
}

.chip-button.primary:hover {
  background: var(--pico-primary-hover);
  border-color: var(--pico-primary-hover);
}

/* ============================================
   TABLE COMPONENTS
   ============================================ */

.table-container {
  position: relative;
  margin: 1rem 0;
}

table[role="grid"] {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color, #fff);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

table[role="grid"] thead {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 20%, transparent);
}

table[role="grid"] thead th {
  position: sticky;
  top: 0;
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 20%, transparent);
  z-index: 10;
  padding: 0.875rem 0.75rem;
  font-weight: 600;
  text-align: left;
  color: var(--pico-color);
  border-bottom: 2px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 60%, transparent);
}

table[role="grid"] tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 30%, transparent);
  vertical-align: middle;
}

table[role="grid"] tbody tr:last-child td {
  border-bottom: none;
}

table.playerCol th:first-child,
table.playerCol  td:first-child {
  min-width: 250px;     
  max-width: 250px;     
  white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Striped table enhancement */
table.striped tbody tr:nth-child(even) {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 8%, transparent);
}

/* Empty state for tables */
.table-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--pico-muted-color);
}

.table-empty h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.table-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================
   PAGINATION COMPONENT
   ============================================ */

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.pager button {
  min-width: 80px;
}

.pager #pageStat {
  font-size: 0.9rem;
  padding: 0 0.5rem;
  color: var(--pico-muted-color);
}

/* ============================================
   MODAL COMPONENTS
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.modal-card {
  position: relative;
  width: min(640px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pico-background-color, #fff);
  border-radius: 16px;
  border: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 50%, transparent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1001;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 40%, transparent);
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 5%, transparent);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 40%, transparent);
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 5%, transparent);
}

.icon-button.close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--pico-muted-color);
  transition: all var(--hover-duration, 0.2s) ease;
}

.icon-button.close:hover {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 20%, transparent);
  color: var(--pico-color);
}

/* ============================================
   FILTER COMPONENTS
   ============================================ */

.filter-panel {
  margin: 1rem 0;
}

.filter-panel > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  color: var(--pico-color);
  padding: 0.5rem 0;
  border-radius: 6px;
  transition: all var(--hover-duration, 0.2s) ease;
}

.filter-panel > summary::-webkit-details-marker {
  display: none;
}

.filter-panel > summary:hover {
  background: color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 10%, transparent);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.filter-panel > summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform var(--hover-duration, 0.2s) ease;
}

.filter-panel[open] > summary::before {
  transform: rotate(90deg);
}

.filters-body {
  padding: 1rem 0;
  border-top: 1px solid color-mix(in oklab, var(--pico-muted-border-color, #e5e7eb) 30%, transparent);
  margin-top: 0.5rem;
}

.inline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.inline-filters label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.inline-filters input,
.inline-filters select {
  margin: 0;
}

/* ============================================
   FORM COMPONENTS
   ============================================ */

.stacked label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stacked label span {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--pico-color);
}

/* Input enhancements */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--pico-primary) 20%, transparent);
}

/* ============================================
   ALERT COMPONENTS
   ============================================ */

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.alert.info {
  background: color-mix(in oklab, #3b82f6 10%, transparent);
  border-left-color: #3b82f6;
  color: #1e40af;
}

.alert.success {
  background: color-mix(in oklab, #10b981 10%, transparent);
  border-left-color: #10b981;
  color: #065f46;
}

.alert.warning {
  background: color-mix(in oklab, #f59e0b 10%, transparent);
  border-left-color: #f59e0b;
  color: #92400e;
}

.alert.error {
  background: color-mix(in oklab, #ef4444 10%, transparent);
  border-left-color: #ef4444;
  color: #991b1b;
}

.alert h5 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.alert p {
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   UTILITY COMPONENTS
   ============================================ */

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--pico-muted-color);
}

.loading-state .loading-spinner {
  margin-right: 0.75rem;
}

.error-state {
  text-align: center;
  padding: 2rem;
  color: var(--pico-muted-color);
}

.error-state h3 {
  margin: 0 0 0.5rem 0;
  color: #ef4444;
}

.error-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-dot.success { background: #10b981; }
.status-dot.error { background: #ef4444; }
.status-dot.warning { background: #f59e0b; }
.status-dot.info { background: #3b82f6; }

/* Add these styles to your components.css file */

/* Search Container - FIXED properly */
.search-container {
  margin: 0;
  position: relative;
}

.search-container form {
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.search-container input[type="search"] {
  width: 80px;
  height: 2.5rem;
  margin: 0;
  padding: 0 0.75rem 0 2.5rem !important;
  font-size: 0.9rem;
  border-radius: 20px;
  background-color: var(--pico-form-element-background-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 16px;
  border: 1px solid var(--pico-form-element-border-color);
  text-indent: 0 !important;
  box-sizing: border-box;
}

/* Override any conflicting styles */
.search-container input[type="search"]::-webkit-input-placeholder {
  padding-left: 0;
  text-indent: 0;
}

.search-container input[type="search"]::-moz-placeholder {
  padding-left: 0;
  text-indent: 0;
}

.search-container input[type="search"]:-ms-input-placeholder {
  padding-left: 0;
  text-indent: 0;
}

.search-container input[type="search"]::placeholder {
  padding-left: 0;
  text-indent: 0;
}

/* Remove webkit search styling */
.search-container input[type="search"]::-webkit-search-decoration,
.search-container input[type="search"]::-webkit-search-cancel-button,
.search-container input[type="search"]::-webkit-search-results-button,
.search-container input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

/* Sidebar Styles - FIXED content accessibility */
.sidebar {
  position: fixed;
  top: 0;
  left: -360px;
  width: 360px;
  height: 100vh;
  background: var(--pico-card-background-color);
  border-right: 1px solid var(--pico-card-border-color);
  z-index: 1000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  /* Ensure proper scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Ensure content starts from the very top */
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Arrow close button - positioned on the right edge */
.sidebar-close-arrow {
  position: absolute;
  top: 20px; /* Fixed position from top */
  right: -20px;
  width: 40px;
  height: 40px;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-card-border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-close-arrow span {
  font-size: 1.25rem;
  color: var(--pico-muted-color);
  transition: all 0.2s ease;
  font-weight: 300;
}

.sidebar-close-arrow:hover {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  transform: scale(1.1);
}

.sidebar-close-arrow:hover span {
  color: white;
}

/* Sidebar content with proper spacing - NO padding top to allow full access */
.sidebar-content {
  flex: 1;
  padding: 0;
  /* Remove any top padding that might hide content */
  margin: 0;
  /* Ensure all content is accessible */
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid color-mix(in oklab, var(--pico-card-border-color) 30%, transparent);
  /* Ensure sections don't get cut off */
  flex-shrink: 0;
}

/* First section should have normal padding - no special top treatment */
.sidebar-section:first-child {
  padding-top: 1.5rem;
}

.sidebar-section:last-child {
  border-bottom: none;
  padding-bottom: 2rem;
  /* Add extra bottom padding for scroll clearance */
  margin-bottom: 1rem;
}

.sidebar-section h4 {
  margin: 0 0 1rem 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--pico-muted-color);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
  border-radius: 8px;
  text-decoration: none;
  color: var(--pico-color);
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: var(--pico-secondary-background);
  color: var(--pico-primary);
  text-decoration: none;
  transform: translateX(4px);
  border-color: color-mix(in oklab, var(--pico-primary) 20%, transparent);
}

.sidebar-link.logout {
  color: #ef4444;
}

.sidebar-link.logout:hover {
  background: color-mix(in oklab, #ef4444 8%, transparent);
  border-color: color-mix(in oklab, #ef4444 30%, transparent);
}

.sidebar-link.login-btn {
  background: linear-gradient(135deg, var(--pico-primary) 0%, color-mix(in oklab, var(--pico-primary) 80%, black) 100%);
  color: white;
  justify-content: center;
  font-weight: 600;
  margin: 0.5rem 0;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--pico-primary) 30%, transparent);
}

.sidebar-link.login-btn:hover {
  background: linear-gradient(135deg, color-mix(in oklab, var(--pico-primary) 90%, black) 0%, color-mix(in oklab, var(--pico-primary) 70%, black) 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--pico-primary) 40%, transparent);
}

.sidebar-link.admin-link {
  background: linear-gradient(135deg, 
    color-mix(in oklab, #ef4444 8%, transparent) 0%,
    color-mix(in oklab, #ef4444 12%, transparent) 100%
  );
  color: #ef4444;
  font-weight: 600;
  border-color: color-mix(in oklab, #ef4444 20%, transparent);
}

.sidebar-link.admin-link:hover {
  background: linear-gradient(135deg, 
    color-mix(in oklab, #ef4444 15%, transparent) 0%,
    color-mix(in oklab, #ef4444 20%, transparent) 100%
  );
  border-color: color-mix(in oklab, #ef4444 40%, transparent);
}

.user-info {
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, 
    color-mix(in oklab, var(--pico-primary) 5%, transparent) 0%,
    color-mix(in oklab, var(--pico-primary) 10%, transparent) 100%
  );
  border-radius: 12px;
  margin-bottom: 0.75rem;
  border: 1px solid color-mix(in oklab, var(--pico-primary) 15%, transparent);
}

.user-info span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--pico-primary);
}

.user-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.user-actions .sidebar-link {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--pico-color);
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.social-link:hover {
  background: var(--pico-secondary-background);
  text-decoration: none;
  transform: translateX(4px);
  border-color: color-mix(in oklab, var(--pico-primary) 20%, transparent);
}

.social-link img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.support-link {
  display: block;
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.support-link:hover {
  transform: scale(1.02);
}

.support-link img {
  max-width: 240px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main Navigation Styles */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-center {
  flex: 1;
  justify-content: center;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--pico-primary) !important;
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
}

/* Menu Toggle Button */
.menu-toggle {
  background: none;
  border: none;
  width: 2rem;
  height: 2rem;
  position: relative;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pico-color);
  transition: all 0.3s ease;
  border-radius: 1px;
}

.menu-toggle:hover span {
  background: var(--pico-primary);
}

/* Quick Auth */
.auth-quick .user-greeting {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}

.login-quick {
  padding: 0.4rem 0.75rem;
  background: var(--pico-primary);
  color: white !important;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.login-quick:hover {
  background: color-mix(in oklab, var(--pico-primary) 80%, black);
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hide-on-small {
    display: none !important;
  }
  
  .search-container input[type="search"] {
    width: 140px;
  }
  
  .nav-center {
    gap: 0.5rem;
  }
  
  .nav-center a {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hide-on-mobile {
    display: none !important;
  }
  
  .search-container input[type="search"] {
    width: 120px;
    font-size: 0.8rem;
  }
  
  .nav-center {
    gap: 0.25rem;
  }
  
  .nav-center a {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }
  
  .sidebar {
    width: 320px;
    left: -320px;
  }
  
  .sidebar-close-arrow {
    right: -18px;
    width: 36px;
    height: 36px;
    top: 15px; /* Adjust for mobile */
  }
  
  .sidebar-section {
    padding: 1.25rem 1rem;
  }
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
  overflow: hidden;
}

/* Add subtle animation to sidebar items */
.sidebar-section {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active link styling */
.main-nav a[href]:hover {
  color: var(--pico-primary);
}

/* Focus styles for accessibility */
.menu-toggle:focus,
.sidebar-close-arrow:focus,
.sidebar-link:focus {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

/* Ensure sidebar scrolls properly on all devices */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--pico-card-background-color);
}

.sidebar::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--pico-muted-color) 30%, transparent);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklab, var(--pico-muted-color) 50%, transparent);
}