/* gallery.css - 图库页面专用样式 */

/* 强制黑色主题 */
body {
  background-color: #000000 !important;
  color: #ffffff !important;
}

.navbar {
  background-color: rgba(0, 0, 0, 0.95) !important;
}

.main-content {
  background-color: #000000 !important;
}

.footer {
  background-color: #000000 !important;
}

.page-header {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.page-title {
  color: #ffffff !important;
}

.page-description {
  color: #cbd5e1 !important;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.stat-number {
  color: #ffffff !important;
}

.stat-label {
  color: #cbd5e1 !important;
}

/* 图库网格 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s ease;
  background: #1a1a1a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(79, 70, 229, 0.5) !important;
}

.gallery-image-container {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-info {
  margin-bottom: 15px;
}

.gallery-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

.gallery-description {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.8;
}

.gallery-category {
  background: rgba(79, 70, 229, 0.8);
  padding: 3px 8px;
  border-radius: 12px;
}

.gallery-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.gallery-actions button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.gallery-actions button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-like:hover {
  color: #ef4444;
}

.btn-view:hover {
  color: #3b82f6;
}

.btn-download:hover {
  color: #10b981;
}

/* 图片查看器 */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.viewer-content {
  position: relative;
  z-index: 1;
  background: #1a1a1a !important;
  border-radius: 20px;
  overflow: hidden;
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  box-shadow: 0 20px 60px rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.viewer-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff !important;
  margin: 0;
}

.viewer-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.viewer-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.viewer-body {
  padding: 20px;
  text-align: center;
}

.viewer-image {
  max-width: 100%;
  max-height: 500px;
  border-radius: 12px;
  object-fit: contain;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .gallery-image-container {
    height: 200px;
  }
}

/* 页面标题区域 - 新布局 */
.page-header {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
  color: white !important;
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
}

.page-header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-left {
  flex: 1;
}

.header-right {
  margin-left: 40px;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff !important;
}

.page-description {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  color: #cbd5e1 !important;
  max-width: 600px;
}

.total-comments {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px;
  padding: 20px 30px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  min-width: 120px;
}

.total-number {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: #ffffff !important;
}

.total-label {
  font-size: 0.9rem;
  opacity: 0.8;
  color: #cbd5e1 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-header-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .header-right {
    margin-left: 0;
    margin-top: 10px;
  }

  .page-title {
    font-size: 2.2rem;
  }

  .page-description {
    font-size: 1rem;
  }

  .total-comments {
    padding: 15px 20px;
    min-width: 100px;
  }

  .total-number {
    font-size: 1.8rem;
  }
}

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

  .gallery-overlay {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.7);
  }

  .page-header {
    padding: 50px 0 30px;
  }

  .page-title {
    font-size: 1.8rem;
  }
}
