/* 首页样式 - 黑色背景 + 白色文字 + 绿色按钮 */

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.nav-logo {
  margin: 0;
  font-size: 38px;
  font-weight: 600;
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

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

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user span {
  color: #ffffff;
  font-size: 15px;
}

.nav-guest {
  display: flex;
  gap: 8px;
}

.nav-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.nav-btn.primary {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.nav-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.nav-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero/Banner 区域 */
.hero {
  position: relative;
  padding: 120px 24px 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(16, 185, 129, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.8) 100%),
    url('https://acgay.oss-cn-hangzhou.aliyuncs.com/ai-image/images/homepage/7.png');
  background-size: auto, auto, cover;
  background-position: center top, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.12), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(52, 211, 153, 0.1), transparent 50%);
  pointer-events: none;
  animation: bgShift 15s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% {
    opacity: 0.6;
    transform: translateX(0);
  }
  50% {
    opacity: 0.9;
    transform: translateX(20px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  margin: 0 0 24px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero-subtitle {
  margin: 0 0 40px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  outline: none;
  display: inline-block;
}

.hero-btn.primary {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.hero-btn.primary:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 装饰圆圈 */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -80px;
  animation-delay: 5s;
}

.circle-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 10%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.5;
  }
}

/* 图片画廊区域 */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px;
}

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

.gallery-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.gallery-filter {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* 瀑布流网格 */
.gallery-grid {
  column-count: 4;
  column-gap: 20px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.gallery-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  background: rgba(255, 255, 255, 0.02);
}

.gallery-item-info {
  padding: 16px;
}

.item-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.item-username {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.item-prompt {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-likes {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.item-featured {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* 加载状态 */
.gallery-loading {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 空状态 */
.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.gallery-empty svg {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.3);
}

.gallery-empty p {
  font-size: 18px;
  margin: 0 0 24px;
}

.empty-action-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.empty-action-btn:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

/* 图片详情模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-modal-card {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  background: rgba(20, 20, 20, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.image-modal-content {
  display: flex;
  height: 100%;
  max-height: 90vh;
}

.image-modal-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  padding: 40px;
  overflow: auto;
}

.image-modal-left img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-right {
  width: 380px;
  display: flex;
  flex-direction: column;
  background: rgba(30, 30, 30, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.image-modal-info {
  flex: 1;
  padding: 32px 24px;
  overflow-y: auto;
}

.modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.user-info {
  flex: 1;
}

.username {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.time {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.modal-prompt,
.modal-description {
  margin-bottom: 24px;
}

.modal-prompt h3,
.modal-description h3 {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-prompt p,
.modal-description p {
  font-size: 15px;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
}

.modal-tags {
  margin-bottom: 24px;
}

.modal-tags > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  font-size: 13px;
  color: #10b981;
}

.modal-actions {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
}

.modal-action-btn {
  flex: 1;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.modal-action-btn.liked {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.like-icon {
  font-size: 18px;
}

.modal-action-btn.liked .like-icon {
  color: #ef4444;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .gallery-grid {
    column-count: 3;
  }
}

/* 底部悬浮操作栏 */
.floating-action-bar {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  z-index: 999;
  width: 200px;
  height: 56px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 28px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}

.floating-action-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-action-bar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 28px;
  padding: 2px;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(16, 185, 129, 0.6),
    transparent,
    rgba(52, 211, 153, 0.6),
    transparent
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  animation: rotate-border 4s linear infinite;
  opacity: 0.8;
}

@keyframes rotate-border {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.floating-action-bar::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 28px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.15),
    transparent 70%
  );
  filter: blur(15px);
  z-index: -2;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.floating-action-content {
  position: relative;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.floating-action-left {
  display: none;
}

.floating-action-text {
  display: none;
}

.floating-action-icon {
  display: none;
}

.floating-action-buttons {
  display: flex;
  gap: 0;
  width: 100%;
  height: 100%;
}

.floating-action-btn {
  flex: 1;
  padding: 0 20px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.floating-action-btn:hover {
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  text-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
}

.floating-action-btn.primary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.floating-action-btn.secondary {
  display: none;
}

.floating-action-btn-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

@media (max-width: 1200px) {
  .gallery-grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 16px;
  }

  .nav-tagline {
    display: none;
  }

  .hero {
    padding: 80px 20px 60px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .gallery-grid {
    column-count: 2;
    column-gap: 16px;
  }

  .gallery-item {
    margin-bottom: 16px;
  }

  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-modal-content {
    flex-direction: column;
  }

  .image-modal-left {
    padding: 20px;
  }

  .image-modal-right {
    width: 100%;
    max-height: 50vh;
  }

  /* 底部悬浮栏响应式 */
  .floating-action-bar {
    bottom: 30px;
    width: 180px;
  }

  .floating-action-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .floating-action-btn-icon {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    column-count: 1;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-btn {
    width: 100%;
  }
}
