/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-06-03 10:28:07
 * Fingerprint: 18f8d0015be24d2b
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

.guestbook-page {
  padding-top: calc(var(--header-height) + var(--space-8));
  padding-bottom: var(--space-10);
  min-height: 100vh;
}

.guestbook-header {
  text-align: center;
  margin-bottom: var(--space-8);
  position: relative;
}

/* 标题样式已提取到 base.css */

.guestbook-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-4);
}

.guestbook-stat {
  text-align: center;
}

.guestbook-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-mono);
}

.guestbook-stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
}

.guestbook-comments {
  width: 100%;
  max-width: 100%;
}

.danmaku-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: 
    linear-gradient(135deg, 
      color-mix(in srgb, var(--color-accent) 6%, transparent),
      color-mix(in srgb, var(--color-accent-secondary) 5%, transparent) 50%,
      color-mix(in srgb, var(--color-accent) 6%, transparent) 100%
    );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
  overflow: hidden;
}

.danmaku-watermark {
  position: absolute;
  bottom: 40px;
  right: 40px;
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-text);
  opacity: 0.015;
  transform: rotate(-45deg);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.danmaku-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

.danmaku-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.danmaku-hint svg {
  width: 24px;
  height: 24px;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --speed-multiplier: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

[data-theme="light"] .danmaku-item {
  background: rgba(255, 255, 255, 0.95);
}

.danmaku-item:hover {
  animation-play-state: paused !important;
  transform: scale(1.1) translateY(-5px);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.danmaku-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.danmaku-author {
  font-weight: 600;
  color: var(--color-accent);
  margin-right: var(--space-2);
}

.danmaku-text {
  color: var(--color-text-secondary);
}

@keyframes danmaku-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100vw - 100%));
  }
}

.danmaku-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.danmaku-modal.active {
  display: flex;
}

.danmaku-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.danmaku-modal-content {
  position: relative;
  width: 90%;
  max-width: 420px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.danmaku-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.danmaku-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.danmaku-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.danmaku-modal-close:hover {
  background: var(--color-bg-mute);
  color: var(--color-text);
  transform: rotate(90deg);
}

.danmaku-modal-close svg {
  width: 18px;
  height: 18px;
}

.danmaku-modal-body {
  padding: var(--space-4);
}

.danmaku-modal-author {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(var(--color-accent-rgb), 0.1);
  border-radius: var(--radius-md);
}

.danmaku-modal-author::before {
  content: '';
  width: 36px;
  height: 36px;
  background-image: var(--avatar-url);
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.danmaku-modal-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  padding: var(--space-3);
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
}

.danmaku-modal-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  background: var(--color-bg-soft);
}

.danmaku-modal-input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--color-text);
  transition: all 0.2s;
  line-height: 1.5;
}

.danmaku-modal-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.danmaku-modal-input::placeholder {
  color: var(--color-text-muted);
}

.danmaku-modal-reply {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.5;
}

.danmaku-modal-reply::before {
  content: '↩';
  font-size: 1rem;
}

.danmaku-modal-reply:hover {
  background: var(--color-accent-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.25);
}

.danmaku-modal-reply:active {
  transform: translateY(0);
}

.danmaku-modal-reply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@media (max-width: 768px) {
  .guestbook-page {
    padding-top: calc(var(--header-height) + var(--space-6));
    padding-bottom: var(--space-6);
  }
  
  .guestbook-header {
    margin-bottom: var(--space-6);
  }
  
  .guestbook-title {
    font-size: 1.4rem;
  }
  
  .guestbook-subtitle {
    font-size: 12px;
  }
  
  .guestbook-stats {
    gap: var(--space-4);
  }
  
  .guestbook-stat-num {
    font-size: 1.2rem;
  }
  
  .guestbook-stat-label {
    font-size: 10px;
  }
  
  .danmaku-container {
    height: 300px;
    margin-bottom: var(--space-6);
  }
  
  .danmaku-watermark {
    font-size: 3rem;
    bottom: 30px;
    right: 30px;
  }
  
  .danmaku-hint {
    font-size: 0.85rem;
  }
  
  .danmaku-hint svg {
    width: 20px;
    height: 20px;
  }
  
  .danmaku-item {
    font-size: 0.8rem;
    padding: var(--space-1) var(--space-3);
  }
  
  .danmaku-avatar {
    width: 20px;
    height: 20px;
  }
}
