/* Sexbilder.no - Image gallery with light/dark theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Dark theme (default) */
:root, [data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-card: #161616;
  --bg-nav: #0f0f0f;
  --bg-input: #1e1e1e;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #ff4d6a;
  --accent-hover: #ff6b82;
  --accent-dark: #c93050;
  --border: #252525;
  --success: #4caf50;
  --shadow: rgba(0,0,0,0.4);
  --logo-glow: 0 0 20px rgba(255,77,106,0.3);
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f5f5;
  --bg-card: #fff;
  --bg-nav: #fff;
  --bg-input: #f0f0f0;
  --text: #222;
  --text-muted: #666;
  --accent: #e0294a;
  --accent-hover: #c91e3d;
  --accent-dark: #a01530;
  --border: #ddd;
  --success: #2e7d32;
  --shadow: rgba(0,0,0,0.08);
  --logo-glow: none;
  --shadow: rgba(0,0,0,0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
header {
  background: linear-gradient(180deg, var(--bg-nav) 0%, #0a0a0a 100%);
  border-bottom: 2px solid var(--accent);
  padding: 16px 0;
  text-align: center;
}

header .logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
}

header .tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Theme toggle */
.theme-toggle {
  position: absolute;
  top: 16px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(255,77,106,0.08);
}

header { position: relative; }

[data-theme="light"] header {
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] nav {
  box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="light"] .image-card {
  box-shadow: 0 1px 4px var(--shadow);
}

[data-theme="light"] .image-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

[data-theme="light"] .gv-backdrop {
  background: rgba(0,0,0,0.92);
}

/* Light theme: ALL text overrides */
[data-theme="light"] main h1,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] .category-section h2 a,
[data-theme="light"] .seo-text h2,
[data-theme="light"] .seo-text h3,
[data-theme="light"] .upload-section h2,
[data-theme="light"] .age-gate-box h2,
[data-theme="light"] .tag-group-letter,
[data-theme="light"] .related-categories h2,
[data-theme="light"] .static-page h1,
[data-theme="light"] .static-page h2,
[data-theme="light"] .auth-page h1 {
  color: #111;
}

[data-theme="light"] .category-section h2 a:hover {
  color: var(--accent);
}

[data-theme="light"] .intro,
[data-theme="light"] .seo-text p,
[data-theme="light"] .static-page p,
[data-theme="light"] .static-page li {
  color: #444;
}

[data-theme="light"] .category-section .count,
[data-theme="light"] .tag-count {
  color: #666;
  background: #eee;
}

[data-theme="light"] header .tagline {
  color: #888;
}

[data-theme="light"] header {
  background: #fff;
}

[data-theme="light"] .nav-dropdown-menu {
  background: #fff;
}

[data-theme="light"] .theme-toggle {
  background: #f0f0f0;
}

[data-theme="light"] .nav-upload {
  color: #fff !important;
}

/* Navigation - mega menu */
nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.nav-toggle::after {
  content: '▼';
  float: right;
  font-size: 0.7rem;
  line-height: 1.6;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-item {
  color: var(--text);
  text-decoration: none;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-upload {
  margin-left: auto;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  border-bottom: none !important;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
}

.nav-upload:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  color: var(--text);
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-btn .arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-nav);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  min-width: 220px;
  padding: 8px 0;
  z-index: 9000;
}

[data-theme="light"] .nav-dropdown-menu {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown:hover .nav-dropdown-btn .arrow {
  transform: rotate(180deg);
}

/* Bridge gap between button and dropdown so hover doesn't break */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
}

.nav-dropdown-menu a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 10px 20px;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 77, 106, 0.08);
  color: var(--accent);
  padding-left: 24px;
}

.nav-dropdown-menu a.active {
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}

/* Main content */
main {
  padding: 24px 0 40px;
}

main h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #fff;
}

.intro {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
  max-width: 800px;
}

/* Image Grid - masonry-like */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.image-card {
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  position: relative;
}

.image-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--accent);
  z-index: 2;
}

.image-card a {
  display: block;
}

.image-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.image-card img {
  opacity: 1;
}

/* Single image page - Facebook-style layout */
.sp-layout { display: flex; min-height: calc(100vh - 60px); }
.sp-image { flex: 1; background: #000; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; }
.sp-image img { max-width: 100%; max-height: calc(100vh - 60px); object-fit: contain; display: block; }
.sp-nav { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.sp-arrow { pointer-events: auto; position: absolute; top: 0; bottom: 0; width: 80px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: rgba(255,255,255,0.6); text-decoration: none; transition: all 0.2s; cursor: pointer; }
.sp-arrow:hover { color: #fff; background: rgba(0,0,0,0.3); }
.sp-prev { left: 0; }
.sp-next { right: 0; }

.sp-sidebar { width: 360px; flex-shrink: 0; background: var(--bg-card); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
.sp-info { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.sp-cat { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.sp-cat:hover { text-decoration: underline; }
.sp-counter { font-size: 0.85rem; color: var(--text-muted); }

.sp-comments { flex: 1; padding: 16px; display: flex; flex-direction: column; }
.sp-comments h3 { margin: 0 0 12px; font-size: 1rem; }
.sp-comments-list { flex: 1; }
.sp-no-comments { color: var(--text-muted); font-size: 0.85rem; }
.sp-comment-login { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }
.sp-comment-login a { color: var(--accent); }

.sp-related { padding: 16px; border-top: 1px solid var(--border); }
.sp-related h3 { margin: 0 0 10px; font-size: 0.95rem; }
.sp-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sp-thumbs a img, .rel-thumb img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; transition: opacity 0.2s; }
.sp-thumbs a:hover img, .rel-thumb:hover img { opacity: 0.8; }

@media (max-width: 900px) {
  .sp-layout { flex-direction: column; }
  .sp-image { min-height: 50vh; }
  .sp-sidebar { width: 100%; }
}

/* Category sections on homepage */
.category-section {
  margin-bottom: 36px;
}

.category-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.category-section h2 a {
  color: #fff;
  text-decoration: none;
}

.category-section h2 a:hover {
  color: var(--accent);
}

.category-section .count {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: normal;
}

.view-all {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.view-all:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Like button */
.like-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #ccc;
  padding: 4px 8px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  z-index: 2;
}

.like-btn:hover { background: rgba(0,0,0,0.8); color: #fff; }
.like-btn.liked { color: var(--accent); }
.like-btn.liked::before { content: ''; }
.like-count { font-size: 0.75rem; }

.image-card { position: relative; }

/* Category filter */
.category-filter {
  margin: 20px 0;
}

.category-filter input {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
}

.category-filter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,77,106,0.2);
}

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

/* Empty categories */
.empty-categories {
  margin: 40px 0 20px;
  opacity: 0.5;
}

.empty-categories h2 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-cat-card {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.empty-cat-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Random section */
.random-section {
  margin-bottom: 32px;
}

.random-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* Hidden by filter */
.category-section.hidden { display: none; }

/* Related categories */
.related-categories {
  margin: 40px 0 20px;
}

.related-categories h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-link {
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.related-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 77, 106, 0.08);
}

/* SEO Text */
.seo-text {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.seo-text h2, .seo-text h3 {
  margin-bottom: 8px;
  color: #fff;
}

.seo-text h3 {
  font-size: 1.1rem;
  margin-top: 16px;
}

.seo-text p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Tags page */
.tag-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 20px 0 32px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  justify-content: center;
}

.tag-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.tag-letter:hover {
  color: var(--accent);
  background: rgba(255, 77, 106, 0.12);
}

.tags-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tag-group {
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 20px 24px;
}

.tag-group-letter {
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  letter-spacing: 1px;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
}

.tag-item {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-item:hover {
  color: var(--accent);
  background: rgba(255, 77, 106, 0.06);
}

.tag-count {
  color: var(--text-muted);
  font-size: 0.75rem;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
}

@media (max-width: 768px) {
  .tag-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .tag-group { padding: 14px 16px; }
  .tag-item { padding: 8px 10px; font-size: 0.85rem; }
  .tag-letter { width: 34px; height: 34px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .tag-list {
    grid-template-columns: 1fr;
  }
}

/* Ads */
.ad-block {
  margin: 20px 0;
  text-align: center;
}

/* Upload Form */
.upload-section {
  margin: 40px 0;
  padding: 28px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.upload-section h2 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.upload-form {
  display: grid;
  gap: 16px;
  max-width: 600px;
}

.upload-form label {
  font-size: 0.9rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.upload-form input[type="text"],
.upload-form select,
.upload-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

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

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 77, 106, 0.05);
}

.upload-dropzone input[type="file"] {
  display: none;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.upload-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

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

.btn:disabled {
  background: var(--border);
  cursor: not-allowed;
}

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

.btn-outline:hover {
  background: rgba(255, 77, 106, 0.1);
}

.upload-status {
  padding: 12px;
  border-radius: 6px;
  display: none;
}

.upload-status.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.upload-status.error {
  display: block;
  background: rgba(255, 77, 106, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* UGC badge */
.ugc-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: var(--accent);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Auth pages */
.auth-page {
  max-width: 420px;
  margin: 0 auto;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.auth-form label {
  font-size: 0.9rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.auth-status {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.auth-status.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.auth-status.error {
  display: block;
  background: rgba(255, 77, 106, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-required {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

.auth-required a {
  color: var(--accent);
  font-weight: 600;
}

/* Nav auth buttons */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-login {
  font-size: 0.85rem !important;
  padding: 8px 12px !important;
}

.nav-register {
  background: transparent !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  border-radius: 6px !important;
  padding: 7px 14px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.nav-register:hover {
  background: rgba(255,77,106,0.1) !important;
}

.nav-user {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* Static pages */
.static-page {
  max-width: 800px;
}

.static-page h1 { margin-bottom: 20px; }

.static-page h2 {
  margin: 24px 0 12px;
  font-size: 1.3rem;
}

.static-page p, .static-page li {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.static-page ul { padding-left: 24px; }
.static-page a { color: var(--accent); }

/* Footer */
footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  margin-top: 40px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Gallery Viewer */
.gallery-viewer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.gallery-viewer.active { display: flex; }

.gv-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
}

.gv-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0,0,0,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.gv-counter {
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
}

.gv-counter .gv-current { color: #fff; font-weight: 700; }

.gv-actions { display: flex; gap: 4px; }

.gv-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  width: 40px; height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.gv-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.gv-close-btn { font-size: 1.5rem; }

.gv-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.gv-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.gv-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: rgba(18,18,24,0.95);
  border-left: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gv-sidebar-hidden { display: none !important; }
.gv-sidebar-header { padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.gv-sidebar-header h3 { margin: 0; font-size: 1rem; color: #fff; }
.gv-comments-list { flex: 1; overflow-y: auto; padding: 12px 16px; }
.gv-comments-list:empty::after { content: 'Ingen kommentarer ennå. Vær den første!'; color: rgba(255,255,255,0.4); font-size: 0.85rem; }
.gv-comment-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.gv-comment-item:last-child { border-bottom: none; }
.gv-comment-author { font-weight: 600; color: var(--accent); font-size: 0.85rem; }
.gv-comment-date { color: rgba(255,255,255,0.35); font-size: 0.75rem; margin-left: 8px; }
.gv-comment-body { margin-top: 4px; font-size: 0.85rem; line-height: 1.4; color: rgba(255,255,255,0.8); }
.gv-comment-form { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.gv-comment-login { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.gv-comment-login a { color: var(--accent); }
.gv-comment-form textarea { width: 100%; padding: 8px 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; color: #fff; font-size: 0.85rem; resize: none; box-sizing: border-box; margin-bottom: 6px; }
.gv-comment-form textarea:focus { border-color: var(--accent); outline: none; }

.gv-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.gv-image {
  max-width: 94%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.gv-loading {
  position: absolute;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: none;
}

.gv-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
}

.gv-nav:hover {
  background: rgba(255, 77, 106, 0.4);
  border-color: var(--accent);
}

.gv-prev { left: 16px; }
.gv-next { right: 16px; }

/* Thumbnail strip */
.gv-thumbstrip {
  position: relative;
  z-index: 2;
  background: rgba(0,0,0,0.85);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px 0;
}

.gv-thumbs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  scroll-behavior: smooth;
}

.gv-thumbs::-webkit-scrollbar { height: 4px; }
.gv-thumbs::-webkit-scrollbar-track { background: transparent; }
.gv-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.gv-thumb {
  flex-shrink: 0;
  width: 64px; height: 48px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: all 0.2s;
}

.gv-thumb:hover {
  opacity: 0.8;
  border-color: rgba(255,255,255,0.3);
}

.gv-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.gv-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Age gate */
.age-gate {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-gate-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
}

.age-gate-box h2 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.age-gate-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.age-gate-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.age-gate-buttons .btn { min-width: 120px; }

/* Responsive - Tablet */
@media (max-width: 900px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .image-card img { height: 200px; }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  header .logo { font-size: 1.5rem; }
  header { padding: 12px 0; }
  .theme-toggle { top: 10px; right: 12px; width: 34px; height: 34px; }

  .nav-toggle { display: block; }

  .nav-bar {
    display: none;
    flex-direction: column;
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-bar.open { display: flex; }

  .nav-item {
    padding: 12px 16px;
    width: 100%;
    border-bottom: none;
  }

  .nav-upload {
    margin: 8px 16px;
    text-align: center;
    border-radius: 6px;
  }

  /* Mobile dropdown = accordion */
  .nav-dropdown { width: 100%; }

  .nav-dropdown-btn {
    width: 100%;
    padding: 12px 16px;
    justify-content: space-between;
    border-bottom: none;
  }

  .nav-dropdown-menu {
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: rgba(255,77,106,0.03);
    display: none;
    padding: 0;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open:hover .nav-dropdown-menu { display: block; }

  .nav-dropdown-menu a {
    padding: 10px 16px 10px 32px;
  }

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

  .image-card img { height: 160px; }
  .image-card { border-radius: 4px; }

  main h1 { font-size: 1.3rem; }
  .intro { font-size: 0.85rem; }

  .upload-section { padding: 20px; }
  .upload-dropzone { padding: 20px; }

  /* Gallery viewer mobile */
  .gv-sidebar { display: none; }
  .gv-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .gv-prev { left: 4px; }
  .gv-next { right: 4px; }
  .gv-thumb { width: 48px; height: 36px; }
  .gv-toolbar { padding: 6px 10px; }
  .gv-btn { width: 36px; height: 36px; font-size: 1rem; }
  .gv-fullscreen-btn { display: none; }
}

@media (max-width: 400px) {
  .image-card img { height: 130px; }
  .container { padding: 0 10px; }
}
