/* TheFapSpot — Global Stylesheet
   Design: Modern dark theme, discovery-first adult database
   Typography: Inter (body), DM Sans (headings)
   Accent: Electric Coral #FF6B6B
*/

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Colors — Deep dark palette */
  --color-body: #0a0a0a;
  --color-surface: #141414;
  --color-surface-elevated: #1a1a1a;
  --color-surface-hover: #1f1f1f;
  --color-border: #2a2a2a;
  --color-border-subtle: #1f1f1f;
  
  /* Text */
  --color-text-primary: #f5f5f5;
  --color-text-secondary: #a3a3a3;
  --color-text-muted: #737373;
  
  /* Accent — Electric Coral */
  --color-accent: #FF6B6B;
  --color-accent-hover: #FF8585;
  --color-accent-subtle: rgba(255, 107, 107, 0.15);
  
  /* Functional */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-link: #FF6B6B;
  --color-link-hover: #FF8585;
  
  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'DM Sans', var(--font-body);
  
  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 2px 8px rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-4);
  --header-height: 48px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-body);
  min-height: 100vh;
}

body.dark {
  /* Class for compatibility — same as default */
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

strong {
  font-weight: 600;
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

main {
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
  min-height: calc(100vh - var(--header-height) - 200px);
}

.section {
  margin-bottom: var(--space-12);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.section-title {
  margin-bottom: 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.section-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-4);
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo:hover {
  color: var(--color-accent);
}

.logo-icon {
  color: var(--color-accent);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
}

.header-search {
  display: flex;
  align-items: center;
}

.search-input {
  width: 200px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), width var(--transition-base);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  width: 280px;
}

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-2);
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-main.open {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .header-search {
    display: none;
  }
  
  .nav-main .header-search {
    display: flex;
    width: 100%;
  }
  
  .nav-main .search-input {
    width: 100%;
  }
}

/* ============================================
   GRIDS
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Model cards grid — 4 columns on desktop */
.grid-models {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Gallery thumbnails grid — 4 columns on desktop */
.grid-galleries {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Studio cards grid */
.grid-studios {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Small cards grid */
.grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-6 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-models {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-galleries {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  transform: none;
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: inherit;
}

/* ============================================
   MODEL CARD
   ============================================ */
.model-card {
  position: relative;
}

.model-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.model-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.model-card:hover .model-card-image img {
  transform: none;
}

.model-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  font-size: var(--text-4xl);
}

.model-card-body {
  padding: var(--space-2) var(--space-3);
}

.model-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.model-card-stat {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.model-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* Featured badge */
.model-card-featured {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: var(--color-accent);
  color: white;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   GALLERY CARD
   ============================================ */
.gallery-card {
  position: relative;
}

.gallery-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface-elevated);
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-card-image img {
  transform: none;
}

.gallery-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  font-size: var(--text-3xl);
}

.gallery-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}

.gallery-card-model {
  font-size: var(--text-sm);
  font-weight: 500;
  color: white;
  margin-bottom: var(--space-1);
}

.gallery-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card-count {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ============================================
   STUDIO CARD
   ============================================ */
.studio-card {
  padding: var(--space-4);
  text-align: center;
}

.studio-card-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-card-placeholder {
  font-size: var(--text-2xl);
  color: var(--color-text-muted);
}

.studio-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-card-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ============================================
   TAG PILLS
   ============================================ */
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.tag:hover {
  background: rgba(255, 107, 107, 0.25);
  color: var(--color-accent-hover);
}

.tag-lg {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.tag-outline {
  background: transparent;
  border: 1px solid var(--color-accent);
}

.tag-muted {
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
}

.tag-muted:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: white;
}

.btn-secondary {
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* CTA Button — prominent but not obnoxious */
.btn-cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, #ff8585 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

.btn-cta:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  transform: translateY(-1px);
  color: white;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

/* ============================================
   TOP 25 LIST
   ============================================ */
.ranked-list {
  counter-reset: rank;
}

.ranked-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.ranked-item:hover {
  background: var(--color-surface-elevated);
}

.ranked-item::before {
  counter-increment: rank;
  content: counter(rank);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ranked-item:nth-child(1)::before {
  background: var(--color-accent);
  color: white;
}

.ranked-item:nth-child(2)::before,
.ranked-item:nth-child(3)::before {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.ranked-item-image {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.ranked-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranked-item-info {
  flex: 1;
  min-width: 0;
}

.ranked-item-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-primary);
}

.ranked-item-name:hover {
  color: var(--color-accent);
}

.ranked-item-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.ranked-item-stat {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* ============================================
   HORIZONTAL SCROLL
   ============================================ */
.scroll-container {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.scroll-item {
  flex: 0 0 auto;
  width: 180px;
}

/* ============================================
   MODEL BIO PAGE
   ============================================ */
.model-hero {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4) 0;
}

.model-portrait {
  width: 200px;
  flex-shrink: 0;
}

.model-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 4rem;
  color: var(--color-text-muted);
}

.model-info h1 {
  margin-bottom: var(--space-3);
}

.model-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
}

.model-stat {
  display: flex;
  gap: var(--space-1);
}

.model-stat-label {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.model-stat-value {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: var(--text-sm);
}

.model-socials {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-accent);
  color: white;
}

.model-bio-section {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.model-bio-section h2 {
  margin-bottom: var(--space-4);
}

.model-bio-section p {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .model-hero {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4) 0;
}
  
  .model-portrait {
  width: 200px;
  flex-shrink: 0;
}
}

/* ============================================
   GALLERY VIEW PAGE
   ============================================ */
.gallery-header {
  margin-bottom: var(--space-6);
}

.gallery-header h1 {
  margin-bottom: var(--space-2);
}

.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.gallery-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.gallery-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.gallery-image:hover {
  transform: scale(1.02);
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-cta {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.gallery-cta h3 {
  margin-bottom: var(--space-4);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--space-2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: var(--text-xl);
  padding: var(--space-4);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

@media (max-width: 768px) {
  .lightbox-nav {
    padding: var(--space-3);
  }
  
  .lightbox-prev {
    left: var(--space-2);
  }
  
  .lightbox-next {
    right: var(--space-2);
  }
}

/* ============================================
   FILTERS
   ============================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.filter-select {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination-item:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.pagination-item.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.pagination-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   CUSTOM LINKS
   ============================================ */
.custom-links {
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.custom-links-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.custom-link-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.custom-link-item:last-child {
  border-bottom: none;
}

.custom-link-item a {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.custom-link-item a:hover {
  color: var(--color-accent);
}

.custom-link-icon {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-6) 0;
  margin-top: var(--space-8);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.footer-section h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-editorial {
  padding: var(--space-6);
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.footer-editorial p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-legal {
  display: flex;
  gap: var(--space-4);
}

.footer-legal a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-legal a:hover {
  color: var(--color-accent);
}

/* RTA Label */
.rta-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   COOKIE CONSENT
   ============================================ */
.cookie-consent {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  max-width: 400px;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
}

.cookie-consent.show {
  display: block;
}

.cookie-consent p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.cookie-consent-actions {
  display: flex;
  gap: var(--space-2);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ============================================
   STATIC PAGES
   ============================================ */
.static-page {
  max-width: 800px;
  margin: 0 auto;
}

.static-page h1 {
  margin-bottom: var(--space-6);
}

.static-page h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.static-page p {
  margin-bottom: var(--space-4);
  line-height: 1.8;
}

.static-page ul,
.static-page ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
  color: var(--color-text-secondary);
}

.static-page li {
  margin-bottom: var(--space-2);
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-hero {
  text-align: center;
  padding: var(--space-8) 0;
}

.search-hero h1 {
  margin-bottom: var(--space-6);
}

.search-form {
  display: flex;
  gap: var(--space-2);
  max-width: 600px;
  margin: 0 auto;
}

.search-form input {
  flex: 1;
  padding: var(--space-4);
  font-size: var(--text-lg);
}

.search-results {
  margin-top: var(--space-8);
}

.search-section {
  margin-bottom: var(--space-8);
}

.search-section h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.search-count {
  font-size: var(--text-sm);
  font-weight: normal;
  color: var(--color-text-muted);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   ADMIN STYLES (unchanged from Carl's work)
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

th, td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

th {
  background: var(--color-surface-elevated);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-size: var(--text-sm);
}

tr:hover td {
  background: var(--color-surface-elevated);
}

.error {
  color: var(--color-error);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-4);
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-xl);
  }
  
  .section {
    margin-bottom: var(--space-8);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-2xl);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
}
