.gallery-page {
  padding-top: 100px;
  min-height: 100vh;
}

.gallery-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  min-height: calc(100vh - 200px);
}

.gallery-sidebar {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 100px;
}

.gallery-sidebar::-webkit-scrollbar {
  width: 4px;
}

.gallery-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-sidebar::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
}

.gallery-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.gallery-sidebar-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.gallery-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--text-primary);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(124, 58, 237, 0.15));
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.media-list-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--glass-border);
}

.media-list-item.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(124, 58, 237, 0.1));
  border-color: rgba(0, 240, 255, 0.3);
}

.media-list-thumb {
  width: 56px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: var(--bg-secondary);
}

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

.media-list-thumb .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.media-list-thumb .play-icon svg {
  width: 18px;
  height: 18px;
  color: var(--neon-cyan);
}

.media-list-info {
  flex: 1;
  min-width: 0;
}

.media-list-info h4 {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-list-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.media-list-type {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* ===== Preview Panel ===== */
.gallery-preview {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 500px;
}

.preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 16px;
  padding: 40px;
}

.preview-empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
}

.preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 400px;
  position: relative;
}

.preview-media img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.preview-media img.zoomed {
  cursor: zoom-out;
  transform: scale(1.5);
}

.preview-media video {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 12px;
  width: 100%;
}

.preview-info {
  padding: 20px 24px;
  border-top: 1px solid var(--glass-border);
}

.preview-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.preview-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .gallery-layout {
    grid-template-columns: 1fr;
  }

  .gallery-sidebar {
    max-height: 300px;
    position: static;
  }

  .gallery-preview {
    min-height: 300px;
  }
}
