/* SimpleGallery 2026 Modern Design System */

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

:root {
  --bg-main: #0f141c;
  --polaroid-bg: #fcfaf5;
  --polaroid-text: #1e293b;
  --polaroid-sub: #64748b;
  --accent-primary: #6366f1;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(99, 102, 241, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);

  --font-title: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-handwriting: 'Caveat', cursive, 'Outfit', sans-serif;
}

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

/* Enforce automatic EXIF orientation reading for all image elements */
img {
  image-orientation: from-image;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Folder Description Banner (.desc / .description dotfiles) */
.folder-desc-banner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(10px);
}

.folder-comment {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 2px;
}

/* App Header & Navigation Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.header-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.header-bottom-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), #ec4899);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
}

.crumb-item {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
  font-weight: 500;
}

.crumb-item:hover {
  color: var(--accent-primary);
}

.crumb-separator {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.8rem;
}

.crumb-active {
  color: var(--text-main);
  font-weight: 600;
}

/* Toolbar Controls */
.toolbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 250px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0.5rem 2.5rem 0.5rem 2.4rem;
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.search-clear-btn {
  position: absolute;
  right: 2.35rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.search-filter-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.search-filter-btn svg {
  pointer-events: none;
}

.search-filter-btn:hover, .search-filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.08);
}

/* Search Active Results Banner */
.search-results-banner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeIn 0.25s ease;
}

.search-results-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-results-badge {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.search-results-text {
  font-size: 0.9rem;
  color: var(--text-main);
}

.exit-search-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.exit-search-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Button & Pill Controls */
.control-btn-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-toggle.active, .btn-toggle:hover {
  color: #fff;
  background: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.fav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 12px;
  margin-left: 4px;
  line-height: 1.2;
}

.btn-toggle.active .fav-count-badge {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Vector Flag & Language Selector System */
.flag-icon {
  width: 19px;
  height: 13px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-selector-container {
  position: relative;
  display: inline-flex;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.lang-dropdown-arrow {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  min-width: 165px;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(14px);
  padding: 4px;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.lang-option-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.lang-option-btn.active {
  background: rgba(99, 102, 241, 0.25);
  font-weight: 600;
  color: var(--accent-primary);
}

.lang-option-btn .lang-code {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* View Mode Selector Dropdown */
.view-selector-container {
  position: relative;
  display: inline-flex;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.view-dropdown-arrow {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.view-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  min-width: 155px;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(14px);
  padding: 4px;
}

.view-option-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.view-option-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.view-option-btn.active {
  background: rgba(99, 102, 241, 0.25);
  font-weight: 600;
  color: var(--accent-primary);
}

.sort-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-select:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary);
}

.sort-select option {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 0.5rem;
}

/* Category Filters Bar */
.filter-bar {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0 0 0;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-btn:hover, .pill-btn.active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
  border-color: var(--accent-primary);
}

.gallery-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Main Workspace Gallery Container */
.gallery-container {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0 4rem 0;
  padding: 0 1.25rem;
}

/* Subfolders Section */
.section-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =============================================================
   ENLARGED & CENTERED FOLDER CARDS DESIGN
   ============================================================= */
.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.folder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.folder-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-color-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.folder-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: var(--accent-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.folder-card:hover .folder-icon-wrapper {
  transform: scale(1.12) rotate(-4deg);
}

.folder-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  image-orientation: from-image;
}

.folder-name {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.folder-meta {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}

/* =============================================================
   GALLERY VIEW PLUGINS STYLES
   (Decoupled into modular stylesheets under css/views/*.css)
   ============================================================= */

.gps-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.2;
}

.gps-badge:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

/* Lightbox Modal Media Viewer */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 9, 15, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

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

.lightbox-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-comment {
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-top: 4px;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}

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

.zoom-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.zoom-badge.zoomed {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.explorer-img {
  width: 100%;
  height: 100%;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  cursor: zoom-in;
  user-select: none;
  touch-action: none;
  transform-origin: center center;
  will-change: transform;
  image-orientation: from-image;
}

.explorer-img.is-panning,
.explorer-img.dragging {
  cursor: grabbing !important;
}

.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  overflow: hidden;
}

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

.lightbox-nav-btn:hover {
  background: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-prev { left: 1.5rem; }
.lightbox-nav-next { right: 1.5rem; }

.lightbox-content-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.lightbox-content-wrapper video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  outline: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-audio-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 400px;
  text-align: center;
}

.lightbox-audio-card audio {
  width: 100%;
}

.lightbox-footer {
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

kbd {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-family: inherit;
  color: #fff;
}

/* Empty State / Loading State */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  color: var(--text-muted);
  gap: 1rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Responsive adjustments */
/* Responsive Mobile Scaling Optimization (768px and smaller) */
@media (max-width: 768px) {
  .app-header {
    padding: 0.6rem 0.85rem !important;
  }
  
  .header-top-row {
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 1.1rem !important;
  }

  .brand-logo {
    width: 26px !important;
    height: 26px !important;
  }

  .toolbar-controls {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
  }

  .btn-toggle,
  .view-btn,
  .search-box,
  .search-input {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.775rem !important;
    height: auto !important;
  }

  .search-box {
    width: 100% !important;
    margin-top: 0.25rem !important;
  }

  .filter-bar {
    padding: 0 0.85rem !important;
    margin-bottom: 0.85rem !important;
  }

  .filter-btn {
    padding: 0.25rem 0.55rem !important;
    font-size: 0.75rem !important;
  }

  .breadcrumbs {
    font-size: 0.8rem !important;
    padding: 0.2rem 0 !important;
  }

  .gallery-container {
    padding: 0 0.75rem !important;
  }

  .folders-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 0.85rem !important;
    margin-bottom: 1.5rem !important;
  }

  .folder-card {
    padding: 0.85rem 0.65rem !important;
    gap: 0.5rem !important;
  }

  .folder-icon-wrapper {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.75rem !important;
  }

  .folder-title {
    font-size: 0.85rem !important;
  }

  .polaroid-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
    gap: 0.85rem !important;
    padding: 0.75rem 0 !important;
  }

  .polaroid-card {
    padding: 8px 8px 12px 8px !important;
    border-radius: 2px !important;
  }

  .polaroid-card::before {
    width: 48px !important;
    height: 14px !important;
    top: -8px !important;
  }

  .polaroid-caption {
    padding-top: 6px !important;
  }

  .polaroid-caption span {
    font-size: 0.85rem !important;
  }

  .polaroid-subcaption {
    font-size: 0.675rem !important;
  }

  .modern-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .lightbox-footer {
    display: none !important;
  }

  #imageExplorerControls {
    display: none !important;
  }

  .lightbox-header {
    padding: 0.6rem 0.85rem !important;
    gap: 0.5rem;
  }

  .lightbox-title {
    font-size: 0.95rem !important;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lightbox-actions {
    gap: 0.3rem !important;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .lightbox-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.9rem !important;
    flex-shrink: 0;
  }

  .lightbox-nav-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
  }

  .lightbox-nav-prev { left: 0.35rem !important; }
  .lightbox-nav-next { right: 0.35rem !important; }
}

@media (max-width: 480px) {
  .polaroid-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  .modern-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

/* Admin Modal & Badge Styles */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-content {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: adminModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminModalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
}

.admin-modal-body {
  padding: 1.5rem;
}

.admin-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.admin-error-msg {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.admin-success-msg {
  color: #34d399;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.btn-toggle.admin-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.2));
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Dotfile Edit Buttons */
.edit-dotfile-btn, .edit-media-comment-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.edit-dotfile-btn:hover, .edit-media-comment-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Folder Protection Badges */
.folder-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.private-badge {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.protected-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.unlocked-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.folder-lock-icon {
  font-size: 2.2rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
}

.relock-btn {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.relock-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.polaroid-card:hover .video-play-overlay,
.grid-card:hover .video-play-overlay {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--accent-primary);
  border-color: #ffffff;
}

.lightbox-exif-panel {
  position: absolute;
  right: 1.5rem;
  top: 4.5rem;
  width: 360px;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 11rem);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.2);
  z-index: 25;
  overflow-y: auto;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.exif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.exif-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exif-panel-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.meta-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.meta-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.825rem;
  gap: 0.75rem;
  line-height: 1.4;
}

.meta-row-label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.meta-row-value {
  color: #f8fafc;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.meta-sample-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.meta-sample-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #cbd5e1;
}

.meta-sample-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-sample-item span:last-child {
  color: #94a3b8;
  flex-shrink: 0;
}

.exif-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.exif-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.exif-value {
  font-size: 0.875rem;
  color: #f8fafc;
  font-weight: 500;
  word-break: break-word;
}

.exif-camera-box {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.875rem;
}

.exif-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.exif-maps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.exif-maps-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  color: white;
}

.folder-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.folder-map-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.55);
  color: white !important;
}

/* Drag & Drop Upload Overlay & Progress Modal */
.drop-zone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px dashed var(--accent-primary);
  margin: 1rem;
  border-radius: var(--radius-xl);
  pointer-events: none;
  animation: fadeIn 0.2s ease;
}

.drop-zone-content {
  text-align: center;
  color: var(--text-main);
  pointer-events: none;
}

.drop-zone-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: bounce 1.2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.drop-zone-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.drop-zone-content p {
  color: var(--text-muted);
  font-size: 1rem;
}

.upload-progress-bar-container {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1rem;
  position: relative;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.2s ease;
  border-radius: 12px;
}

/* Drag & Drop Internal Item Moving Styles */
.drag-handle {
  cursor: grab !important;
}

.drag-handle:active {
  cursor: grabbing !important;
}

.polaroid-card.dragging,
.grid-card.dragging,
.mosaic-card.dragging,
.folder-card.dragging,
.list-table-row.dragging {
  opacity: 0.35 !important;
  transform: scale(0.95) !important;
  filter: grayscale(30%) !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.drop-hover {
  outline: 3px dashed #6366f1 !important;
  outline-offset: -3px;
  background: rgba(99, 102, 241, 0.25) !important;
  transform: scale(1.04) !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4) !important;
}

.crumb-item.drop-hover {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-radius: 6px;
  padding: 2px 8px;
  transform: scale(1.08) !important;
}

/* Delete Item Buttons */
.delete-item-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  opacity: 0.85;
}

.delete-item-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.15);
  opacity: 1;
}

.folder-card, .polaroid-card, .grid-card {
  position: relative;
}

.folder-card .delete-item-btn {
  top: 10px;
  right: 10px;
}

/* -------------------------------------------------------------
 * 1. FLOATING PICTURE-IN-PICTURE (PiP) PLAYER WIDGET
 * ------------------------------------------------------------- */
#pip-player-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

#pip-player-widget.minimized {
  height: 52px;
  width: 240px;
}

#pip-player-widget.minimized .pip-media-content {
  display: none;
}

#pip-player-widget.expanded {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 10000 !important;
  background: rgba(0, 0, 0, 0.96) !important;
}

#pip-player-widget.expanded .pip-header {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  cursor: default;
}

#pip-player-widget.expanded .pip-title {
  font-size: 1rem;
  max-width: calc(100vw - 200px);
}

#pip-player-widget.expanded .pip-media-content {
  flex: 1;
  width: 100%;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pip-player-widget.expanded .pip-media-content video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 56px);
  object-fit: contain;
}

#pip-player-widget.expanded .pip-media-content audio {
  width: min(600px, 90vw);
}

#pip-player-widget.expanded .pip-info-panel {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 100px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  z-index: 10001;
}

.pip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: move;
}

.pip-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.pip-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.pip-btn:hover {
  background: #6366f1;
  color: white;
}

.pip-media-content {
  width: 100%;
  max-height: 200px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pip-media-content video, .pip-media-content audio {
  width: 100%;
  max-height: 200px;
  outline: none;
}

.pip-info-panel {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.pip-info-panel .meta-section-card {
  padding: 0.55rem 0.75rem;
  gap: 0.4rem;
}

.pip-info-panel .meta-row {
  font-size: 0.75rem;
}

/* -------------------------------------------------------------
 * 2. FAVORITES HEART BADGES & TOGGLE
 * ------------------------------------------------------------- */
.favorite-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.favorite-btn:hover, .favorite-btn.is-favorite {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border-color: #ef4444;
}

.pip-card-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.pip-card-btn:hover {
  background: #6366f1;
  color: #ffffff;
  transform: scale(1.1);
}
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.favorite-btn.is-favorite {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

.favorite-btn:hover {
  transform: scale(1.2);
  color: #ef4444;
}

/* -------------------------------------------------------------
 * 3. MULTI-FORMAT ARCHIVE DROPDOWN MENU
 * ------------------------------------------------------------- */
.archive-dropdown-container {
  position: relative;
  display: inline-block;
}

.archive-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  z-index: 100;
  display: none;
}

.archive-dropdown-container:hover .archive-dropdown-menu,
.archive-dropdown-menu.show {
  display: block;
}

.archive-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.archive-option-item:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
}

/* -------------------------------------------------------------
 * 4. GOOGLE DRIVE STYLE ADVANCED SEARCH MODAL
 * ------------------------------------------------------------- */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-modal-backdrop.open {
  opacity: 1;
}

.search-modal-card {
  width: 100%;
  max-width: 620px;
  background: #182030;
  background-image: linear-gradient(180deg, #1c263a 0%, #131a28 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 90vh;
  overflow-y: auto;
}

.gdrive-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}

.gdrive-modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
}

.gdrive-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gdrive-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.gdrive-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gdrive-form-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
}

@media (max-width: 580px) {
  .gdrive-form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.gdrive-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
}

.gdrive-form-control {
  width: 100%;
}

.gdrive-input, .gdrive-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.gdrive-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.gdrive-select option {
  background: #182030;
  color: #f8fafc;
}

.gdrive-input:focus, .gdrive-select:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.gdrive-input::placeholder {
  color: #64748b;
}

.gdrive-date-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gdrive-date-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

.gdrive-date-input {
  flex: 1;
}

.gdrive-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gdrive-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #e2e8f0;
  cursor: pointer;
}

.gdrive-checkbox {
  width: 17px;
  height: 17px;
  accent-color: #6366f1;
  cursor: pointer;
}

.gdrive-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gdrive-btn-text {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gdrive-btn-text:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gdrive-btn-primary {
  background: #2563eb;
  background-image: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.gdrive-btn-primary:hover {
  background-image: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
 * 5. ADMIN PERMISSIONS MATRIX UI
 * ------------------------------------------------------------- */
.permissions-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.perm-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.perm-checkbox-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.perm-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* -------------------------------------------------------------
 * 6. LEAFLET INTERACTIVE MAP & GPS TRAIL
 * ------------------------------------------------------------- */
.folder-map-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.folder-map-btn:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.gps-badge {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.gps-badge:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: scale(1.05);
}

/* Fullscreen / Backdrop Map Modal */
.map-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.map-modal-backdrop.open {
  opacity: 1;
}

.map-modal-card {
  width: 100%;
  max-width: 1200px;
  height: 88vh;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #182030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 12px;
}

.map-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.map-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.map-count-badge {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.map-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-layer-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px;
}

.map-layer-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-layer-btn:hover {
  color: #ffffff;
}

.map-layer-btn.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.map-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.map-ctrl-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #a5b4fc;
}

.map-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.map-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  background: #0f172a;
  z-index: 1;
}

/* Custom Marker Pins with Photo Thumbnails */
.custom-map-marker {
  background: transparent;
  border: none;
}

.marker-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(99, 102, 241, 0.6);
  overflow: hidden;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marker-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marker-pointer {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ffffff;
  margin: -2px auto 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.marker-bubble.magic {
  border: 2.5px dashed #c084fc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(192, 132, 252, 0.75);
}

.marker-magic-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #9333ea;
  background-image: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.marker-pointer.magic-pointer {
  border-top-color: #c084fc;
}

.custom-map-marker:hover .marker-bubble,
.marker-bubble.highlight {
  transform: scale(1.25) translateY(-4px);
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.8), 0 0 0 3px #ffffff;
  z-index: 9999 !important;
}

.custom-map-marker:hover .marker-bubble.magic,
.marker-bubble.magic.highlight {
  border-color: #d8b4fe;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.9), 0 0 0 3px #ffffff;
}

.map-popup-magic-badge {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gps-badge.magic-badge {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.gps-badge.magic-badge:hover {
  background: #9333ea;
  color: #ffffff;
  border-color: #9333ea;
}

/* Custom Leaflet Popups */
.sg-leaflet-popup .leaflet-popup-content-wrapper {
  background: #182030;
  background-image: linear-gradient(180deg, #1e293b 0%, #111827 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  padding: 0;
  overflow: hidden;
}

.sg-leaflet-popup .leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
}

.sg-leaflet-popup .leaflet-popup-tip {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.sg-leaflet-popup a.leaflet-popup-close-button {
  color: #94a3b8;
  padding: 6px;
}

.sg-leaflet-popup a.leaflet-popup-close-button:hover {
  color: #ffffff;
}

.map-popup-card {
  width: 240px;
  display: flex;
  flex-direction: column;
}

.map-popup-img-wrap {
  width: 100%;
  height: 140px;
  position: relative;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.map-popup-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.map-popup-img-wrap:hover img {
  transform: scale(1.05);
}

.map-popup-play-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-popup-info {
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-popup-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-popup-date {
  font-size: 0.775rem;
  color: #94a3b8;
}

.map-popup-comment {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-popup-btn {
  margin-top: 6px;
  background: #6366f1;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.map-popup-btn:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Lightbox EXIF Mini Map */
.exif-mini-map {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin: 8px 0;
  overflow: hidden;
  background: #0f172a;
}

/* Protection anti-téléchargement direct (Désactivation glisser-déposer & clic droit) */
body.no-direct-download img,
body.no-direct-download video,
body.no-direct-download audio {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Multi-Selection & Rectangular Marquee Selection Styles */
.polaroid-card.selected,
.grid-card.selected,
.mosaic-card.selected {
  outline: 3px solid #6366f1 !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.5) !important;
  transform: translateY(-2px);
  position: relative;
}

.polaroid-card.selected::before,
.grid-card.selected::before,
.mosaic-card.selected::before {
  content: '✓';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: #6366f1;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.list-table-row.selected {
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: inset 4px 0 0 #6366f1, 0 0 12px rgba(99, 102, 241, 0.2) !important;
}

.list-table-row.selected .list-col-preview {
  position: relative;
}

.list-table-row.selected .list-col-preview::after {
  content: '✓';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  background: #6366f1;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.65rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Rectangular Marquee Lasso Selection Box */
.selection-marquee {
  position: fixed;
  border: 1.5px dashed #6366f1;
  background: rgba(99, 102, 241, 0.18);
  pointer-events: none;
  z-index: 9999;
  border-radius: 4px;
}

/* Floating Multi-Selection Action Toolbar */
.selection-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1500;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
}

.selection-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  padding: 0.35rem 0.8rem;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.selection-btn:hover {
  background: #6366f1;
}

/* Custom Drag Follower (50% True CSS Transparency on Drag Preview) */
.custom-drag-follower {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none !important;
  z-index: 10000;
  opacity: 0.5;
  transform: translate(-50%, -50%);
  border: 2px solid #6366f1;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
}

.drag-follower-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #6366f1;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* -------------------------------------------------------------
 * 12. APP FOOTER & PRIVACY / COOKIES LINK
 * ------------------------------------------------------------- */
.app-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.footer-separator {
  opacity: 0.4;
}

.footer-tech {
  opacity: 0.7;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-link-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.footer-link-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
 * 13. RGPD / ePrivacy COOKIE CONSENT FLOATING TOAST BANNER
 * ------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 850px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  padding: 1.25rem 1.5rem;
  animation: cookieBannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieBannerSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-banner-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-banner-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 6px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 12px;
}

.cookie-banner-title-group {
  flex: 1;
}

.cookie-banner-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.cookie-banner-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.cookie-banner-desc strong {
  color: #ffffff;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.cookie-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
}

.cookie-btn:active {
  transform: scale(0.97);
}

.cookie-btn-primary {
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.cookie-btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.cookie-btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
}

.cookie-btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* -------------------------------------------------------------
 * 14. DETAILED COOKIE SETTINGS MODAL
 * ------------------------------------------------------------- */
.cookie-modal-card {
  max-width: 600px !important;
  width: 90% !important;
}

.cookie-modal-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.cookie-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.cookie-option-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.cookie-option-info {
  flex: 1;
}

.cookie-option-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cookie-option-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.cookie-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cookie-badge-required {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.cookie-badge-optional {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.cookie-option-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.cookie-toggle-wrap {
  padding-top: 2px;
}

.cookie-toggle-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-primary, #6366f1);
}

.cookie-toggle-wrap input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 540px) {
  .cookie-banner {
    bottom: 24px;
  }
  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-banner-header {
    flex: 1;
  }
  .cookie-banner-actions {
    flex-shrink: 0;
  }
  .cookie-modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* -------------------------------------------------------------
 * 15. ADMIN IMAGE EDITOR MODAL & CANVAS WORKSPACE
 * ------------------------------------------------------------- */
.editor-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.editor-modal-card {
  width: 96vw;
  max-width: 1300px;
  height: 92vh;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-modal-header {
  padding: 0.9rem 1.4rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.editor-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.editor-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.editor-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.editor-dim-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.editor-btn-primary {
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.editor-btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.editor-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.editor-close-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.editor-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.editor-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

@media (min-width: 860px) {
  .editor-modal-body {
    flex-direction: row;
  }
}

.editor-workspace {
  flex: 1;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
  position: relative;
  user-select: none;
}

.editor-canvas-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  line-height: 0;
}

.editor-canvas {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: 4px;
  object-fit: contain;
}

/* Interactive Crop Selection Overlay */
.editor-crop-box {
  position: absolute;
  border: 2px solid #6366f1;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  cursor: move;
  pointer-events: auto;
  box-sizing: border-box;
}

.crop-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid #6366f1;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 10;
}

.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.handle-n  { top: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.handle-s  { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.handle-w  { top: calc(50% - 6px); left: -6px; cursor: ew-resize; }
.handle-e  { top: calc(50% - 6px); right: -6px; cursor: ew-resize; }

/* Editor Sidebar & Tool Panels */
.editor-sidebar {
  width: 100%;
  max-width: 100%;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-shrink: 0;
}

@media (min-width: 860px) {
  .editor-sidebar {
    width: 340px;
    max-width: 340px;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.editor-tool-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
}

.editor-section-title {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crop-ratio-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  gap: 0.4rem;
}

.crop-ratio-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.crop-ratio-btn:hover, .crop-ratio-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
}

.editor-tool-row {
  display: flex;
  gap: 0.5rem;
}

.editor-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.editor-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.editor-tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.editor-tool-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #a5b4fc;
}

.editor-tool-btn-accent {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

.editor-tool-btn-accent:hover {
  background: #4f46e5;
}

.editor-slider-group {
  margin-bottom: 0.85rem;
}

.editor-slider-group:last-child {
  margin-bottom: 0;
}

.editor-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

.slider-val {
  color: #a5b4fc;
  font-variant-numeric: tabular-nums;
}

.editor-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  accent-color: #6366f1;
}

.editor-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.editor-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-filter-btn:hover, .editor-filter-btn.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

/* Save Image Mode Choice Modal Card */
.save-choice-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-choice-card:hover, .save-choice-card:has(.save-choice-radio:checked) {
  background: rgba(99, 102, 241, 0.12);
  border-color: #6366f1;
}

.save-choice-radio {
  margin-top: 3px;
  accent-color: #6366f1;
  cursor: pointer;
}

.save-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.save-choice-text strong {
  font-size: 0.9rem;
  color: var(--text-main, #f8fafc);
}

.save-choice-text span {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}

.save-choice-text code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 5px;
  border-radius: 4px;
  color: #a5b4fc;
}

#imageSaveChoiceModal {
  z-index: 12000;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* -------------------------------------------------------------
 * 16. LANGUAGE SELECTOR & i18n DROPDOWN
 * ------------------------------------------------------------- */
.lang-selector-container {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-btn #currentLangFlag {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn #currentLangCode {
  letter-spacing: 0.5px;
}

.lang-dropdown-arrow {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 175px;
  background: var(--bg-card, rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
  padding: 0.35rem;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: langDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lang-option-btn {
  background: transparent;
  border: none;
  color: var(--text-main, #f8fafc);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.825rem;
  font-weight: 500;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.lang-option-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
}

.lang-option-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-weight: 700;
}

.lang-option-btn .lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-option-btn .lang-name {
  flex: 1;
}

.lang-option-btn .lang-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
 * 17. FIXED BOTTOM APPLICATION FOOTER
 * ------------------------------------------------------------- */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card, rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  z-index: 800;
  padding: 0.4rem 1.25rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.footer-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-info {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-github-link {
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.footer-github-link:hover {
  color: var(--accent-primary, #6366f1);
  transform: translateY(-1px);
}

.footer-separator {
  margin: 0 0.35rem;
  opacity: 0.4;
}

.footer-tech {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-links {
  display: inline-flex;
  align-items: center;
}

.footer-link-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.footer-link-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color, rgba(255, 255, 255, 0.1));
}





