:root {
  --bg-gradient: linear-gradient(135deg, #f5e6ff 0%, #ffeef5 50%, #e6f3ff 100%);
  --accent-pink: #ff8ac9;
  --accent-purple: #b38bff;
  --accent-yellow: #ffd36b;
  --accent-blue: #7fd4ff;
  --text-main: #2c2340;
  --text-muted: #7a7195;
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-soft: rgba(255, 255, 255, 0.8);
  --shadow-soft: 0 18px 45px rgba(44, 35, 64, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: var(--bg-gradient);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 移动端优化 */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.page-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-gradient);
  z-index: -2;
}

.sanrio-badge {
  position: fixed;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  z-index: -1;
}

.sanrio-badge-1 {
  top: 6%;
  left: 4%;
  background-image: url('images/kuromi.png');
  background-size: cover;
  background-position: center;
}
.sanrio-badge-2 {
  bottom: 10%;
  right: 8%;
  background-image: url('images/pompompurin.png');
  background-size: cover;
  background-position: center;
}
.sanrio-badge-3 {
  top: 22%;
  right: 18%;
  background-image: url('images/patachoko.png');
  background-size: cover;
  background-position: center;
}

/* 移动端优化 */
@media (max-width: 640px) {
  .sanrio-badge {
    pointer-events: none;
    opacity: 0.6;
  }
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(50, 28, 89, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--accent-purple);
}

.nav-center {
  flex: 1;
  text-align: center;
}

.scroll-hint {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-right: 20px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(179, 139, 255, 0.1);
  transform: scale(1.05);
}

.nav-link.active {
  color: var(--accent-purple);
  background: rgba(179, 139, 255, 0.15);
}

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

.welcome-text {
  font-size: 13px;
  color: var(--text-muted);
}

.btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  /* 移动端触摸优化 */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  box-shadow: 0 10px 25px rgba(246, 136, 203, 0.4);
}

.btn.primary:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 32px rgba(246, 136, 203, 0.55);
}

.btn.ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(186, 166, 230, 0.6);
}

.btn.ghost:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 12px 26px rgba(108, 88, 188, 0.22);
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hidden {
  display: none !important;
}

.main-layout {
  min-height: calc(100vh - 120px);
}

.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page-section.active {
  display: block;
}

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

/* 首页样式 */
#homePage {
  text-align: center;
  padding: 40px 0 60px;
}

.home-content-list {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid rgba(186, 166, 230, 0.3);
}

.intro-text {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 40px;
  line-height: 1.6;
}

.timer-card {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 50px 40px;
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(179, 139, 255, 0.25);
  position: relative;
  overflow: hidden;
  animation: cardFloat 3s ease-in-out infinite;
}

.timer-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(179, 139, 255, 0.1), transparent);
  animation: shimmer 4s linear infinite;
}

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

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.timer-label {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-weight: 500;
}

.timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 30px 0;
  position: relative;
  z-index: 1;
}

.time-block {
  text-align: center;
  min-width: 120px;
  position: relative;
  animation: numberPulse 2s ease-in-out infinite;
  animation-delay: calc(var(--delay, 0) * 0.2s);
}

@keyframes numberPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes numberFlip {
  0% {
    transform: rotateX(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotateX(90deg) scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: rotateX(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes timerGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(179, 139, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(179, 139, 255, 0.6), 0 0 60px rgba(246, 136, 203, 0.4);
  }
}

.time-number {
  font-size: 80px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-blue));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(179, 139, 255, 0.5);
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
  animation: gradientShift 3s ease infinite;
  filter: drop-shadow(0 4px 8px rgba(179, 139, 255, 0.3));
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.time-number::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  opacity: 0.5;
  animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scaleX(1);
  }
}

.time-label {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

.time-sep {
  font-size: 48px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  padding: 0 12px;
  animation: sepBlink 1.5s ease-in-out infinite;
}

@keyframes sepBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.timer-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.sparkle {
  font-size: 16px;
}

.action-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-width: 160px;
  justify-content: center;
  /* 移动端触摸优化 */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.action-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  box-shadow: 0 10px 25px rgba(246, 136, 203, 0.4);
}

.action-btn.primary:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 32px rgba(246, 136, 203, 0.55);
}

.action-btn.secondary {
  color: var(--text-main);
  background: #fff;
  border: 1px solid rgba(186, 166, 230, 0.6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.action-btn.secondary:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 26px rgba(108, 88, 188, 0.22);
}

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

/* 上传页面 */
#uploadPage {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 0;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-purple);
  text-align: center;
  margin-bottom: 30px;
}

.upload-panel {
  padding: 30px;
  border-radius: var(--radius-xl);
}

/* 摘要输入框样式（可爱风格） */
.summary-textarea {
  width: 100%;
  border-radius: 16px;
  border: 2px solid rgba(191, 173, 232, 0.5);
  padding: 16px;
  font-size: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  resize: vertical;
  transition: all 0.3s ease;
  line-height: 1.8;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(179, 139, 255, 0.1);
}

.summary-textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 6px 20px rgba(179, 139, 255, 0.25);
  background: #fff;
  transform: translateY(-2px);
}

.summary-textarea::placeholder {
  color: rgba(122, 113, 149, 0.6);
  font-style: italic;
}

/* 文件选择列表样式 */
.selected-files-list {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(186, 166, 230, 0.4);
}

.selected-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.selected-files-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.selected-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid rgba(186, 166, 230, 0.3);
  transition: all 0.2s ease;
}

.selected-file-item:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent-purple);
  transform: translateX(4px);
}

.file-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.remove-file-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(227, 81, 109, 0.1);
  color: #e3516d;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-file-btn:hover {
  background: #e3516d;
  color: #fff;
  transform: scale(1.1);
}

/* 帖子详情页 */
#detailPage {
  padding: 40px 0 60px;
  max-width: 900px;
  margin: 0 auto;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-purple);
  margin: 0;
  flex: 1;
}

.detail-content {
  padding: 40px;
  border-radius: var(--radius-xl);
}

.detail-summary-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px dashed rgba(186, 166, 230, 0.3);
}

.summary-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-content {
  font-size: 16px;
  line-height: 2;
  color: var(--text-main);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  padding: 24px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(191, 173, 232, 0.3);
  box-shadow: 0 4px 16px rgba(179, 139, 255, 0.1);
  min-height: 100px;
}

.summary-content p {
  margin: 0 0 12px 0;
}

.summary-content p:last-child {
  margin-bottom: 0;
}

.detail-files-section {
  margin-top: 30px;
}

.files-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-files-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(186, 166, 230, 0.4);
  transition: all 0.2s ease;
}

.detail-file-item:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent-purple);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(179, 139, 255, 0.2);
}

/* 媒体文件预览样式 */
.detail-media-item {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.detail-media-preview {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.detail-media-image {
  width: 100%;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.5);
}

.detail-media-video {
  width: 100%;
  max-width: 100%;
  max-height: 500px;
  display: block;
  background: rgba(0, 0, 0, 0.1);
}

.detail-file-meta-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 16px 20px;
  color: white;
}

.detail-file-meta-overlay .detail-file-name {
  color: white;
  font-weight: 600;
  margin-bottom: 4px;
}

.detail-file-meta-overlay .detail-file-size {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.detail-file-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.file-icon-large {
  font-size: 32px;
  flex-shrink: 0;
}

.detail-file-meta {
  flex: 1;
  min-width: 0;
}

.detail-file-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  word-break: break-all;
}

.detail-file-size {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-file-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .detail-file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .detail-file-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .detail-file-actions .btn {
    flex: 1;
  }
}

/* 内容列表页面 */
#listPage {
  padding: 40px 0 60px;
}

.page-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.category-tab {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  border: 1px solid rgba(186, 166, 230, 0.5);
  transition: all 0.2s ease;
}

.category-tab:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.9);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(246, 136, 203, 0.4);
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.search-input {
  flex: 1;
  border: 1px solid rgba(191, 173, 232, 0.7);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(179, 139, 255, 0.2);
}

.search-btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  font-size: 16px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(246, 136, 203, 0.4);
}

/* 个人主页 */
#profilePage {
  padding: 40px 0 60px;
}

.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.profile-tab {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  border: 1px solid rgba(186, 166, 230, 0.5);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.profile-tab:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.9);
}

.profile-tab.active {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(246, 136, 203, 0.4);
}

.profile-content {
  min-height: 400px;
}

/* 时间线样式（朋友圈风格） */
.timeline-container {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-date-group {
  margin-bottom: 40px;
}

.timeline-date-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.timeline-date-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 166, 230, 0.5), transparent);
}

.timeline-date-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-purple);
  padding: 6px 16px;
  background: rgba(179, 139, 255, 0.1);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.timeline-posts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-post-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-left: 20px;
}

.timeline-post-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-pink));
  opacity: 0.3;
}

.timeline-post-time {
  min-width: 100px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 8px;
  text-align: right;
  flex-shrink: 0;
}

.timeline-post-content {
  flex: 1;
}

.timeline-search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.timeline-date-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(186, 166, 230, 0.6);
  border-radius: var(--radius-pill);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.timeline-date-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(179, 139, 255, 0.2);
}

@media (max-width: 640px) {
  .timeline-post-item {
    flex-direction: column;
    gap: 8px;
    padding-left: 12px;
  }
  
  .timeline-post-time {
    text-align: left;
    min-width: auto;
    padding-top: 0;
  }
  
  .timeline-date-header {
    gap: 8px;
  }
  
  .timeline-date-label {
    font-size: 12px;
    padding: 4px 12px;
  }
}

.profile-section {
  display: none;
}

.profile-section.active {
  display: block;
}

.notification-item {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid rgba(211, 195, 253, 0.5);
  box-shadow: 0 4px 12px rgba(68, 50, 129, 0.08);
  transition: all 0.2s ease;
}

.notification-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(68, 50, 129, 0.12);
}

.notification-item.unread {
  background: rgba(179, 139, 255, 0.1);
  border-color: var(--accent-purple);
}

.notification-item .notification-content {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
}

.notification-item .notification-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.users-table th,
.users-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(186, 166, 230, 0.3);
}

.users-table th {
  background: rgba(179, 139, 255, 0.1);
  font-weight: 600;
  color: var(--text-main);
}

.users-table tr:hover {
  background: rgba(179, 139, 255, 0.05);
}

/* 点赞和评论按钮 */
.like-btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  background: rgba(255, 138, 201, 0.15);
  color: var(--accent-pink);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.like-btn:hover {
  background: rgba(255, 138, 201, 0.25);
  transform: scale(1.05);
}

.like-btn.liked {
  background: rgba(255, 138, 201, 0.3);
  color: #ff5ba3;
}

.comment-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(186, 166, 230, 0.3);
}

.comment-form {
  margin-bottom: 16px;
}

.comment-input {
  width: 100%;
  border: 1px solid rgba(191, 173, 232, 0.7);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.comment-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(179, 139, 255, 0.2);
}

.comment-item {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(186, 166, 230, 0.3);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-purple);
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-content {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  word-wrap: break-word;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid rgba(211, 195, 253, 0.5);
  box-shadow: 0 10px 26px rgba(68, 50, 129, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  height: 500px; /* 固定高度 */
  max-height: 500px;
}

.card:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 20px 40px rgba(68, 50, 129, 0.2);
  border-color: var(--accent-purple);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffeef5, #e6f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.card-cover-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.card-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-purple);
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
  line-height: 1.4;
}

/* 附件预览标签 */
.attachment-preview-tag {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px 4px 2px 0;
  background: rgba(179, 139, 255, 0.1);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--accent-purple);
  border: 1px solid rgba(179, 139, 255, 0.3);
}

.more-files-hint {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px 4px;
  background: rgba(246, 136, 203, 0.1);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--accent-pink);
  font-weight: 600;
}

.view-detail-hint {
  margin-top: 8px;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--accent-purple);
  background: rgba(179, 139, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(179, 139, 255, 0.3);
  font-weight: 500;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(186, 166, 230, 0.3);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.card-action-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-action-btn.preview {
  background: rgba(179, 139, 255, 0.15);
  color: var(--accent-purple);
}

.card-action-btn.preview:hover {
  background: rgba(179, 139, 255, 0.25);
  transform: scale(1.05);
}

.card-action-btn.download {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
}

.card-action-btn.download:hover {
  transform: scale(1.05);
}

.card-action-btn.delete {
  background: rgba(227, 81, 109, 0.15);
  color: #e3516d;
}

.card-action-btn.delete:hover {
  background: rgba(227, 81, 109, 0.25);
  transform: scale(1.05);
}

.attachments-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: 200px;
  padding-right: 4px;
}

.attachments-list::-webkit-scrollbar {
  width: 6px;
}

.attachments-list::-webkit-scrollbar-track {
  background: rgba(186, 166, 230, 0.1);
  border-radius: 3px;
}

.attachments-list::-webkit-scrollbar-thumb {
  background: rgba(179, 139, 255, 0.5);
  border-radius: 3px;
}

.attachments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(179, 139, 255, 0.7);
}

.attachment-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(186, 166, 230, 0.35);
  background: rgba(255, 255, 255, 0.85);
  gap: 8px;
}

.attachment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.attachment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-actions .card-action-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.lock-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.badge.public {
  background: rgba(127, 212, 255, 0.18);
  color: #0f7da4;
}

.badge.encrypted {
  background: rgba(255, 153, 212, 0.18);
  color: #ce2a74;
}

.badge.category {
  background: rgba(179, 139, 255, 0.18);
  color: var(--accent-purple);
  font-weight: 600;
}

.badge.category.life {
  background: rgba(255, 138, 201, 0.18);
  color: #ff5ba3;
}

.badge.category.study {
  background: rgba(127, 212, 255, 0.18);
  color: #0f7da4;
}

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.field span,
.field legend {
  font-weight: 600;
  color: var(--text-main);
}

.field input[type='text'],
.field input[type='password'],
.field input[type='file'] {
  border-radius: 12px;
  border: 1px solid rgba(191, 173, 232, 0.7);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  transition: all 0.2s ease;
}

.field input[type='text']:focus,
.field input[type='password']:focus,
.field input[type='file']:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(179, 139, 255, 0.2);
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.muted {
  font-size: 13px;
  color: var(--text-muted);
}

.status-text {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
}

.status-text.error {
  color: #e3516d;
}

.status-text.success {
  color: #2fa66a;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 16, 61, 0.4);
  backdrop-filter: blur(4px);
}

.modal-body {
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  z-index: 1001;
  max-height: 90vh;
  overflow-y: auto;
}

.preview-modal {
  max-width: 90vw;
  max-height: 90vh;
}

.preview-content {
  max-height: 70vh;
  overflow: auto;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 20px;
}

.preview-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.preview-content video {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-md);
  background: #000;
}

.preview-content iframe {
  width: 100%;
  min-height: 500px;
  border: none;
  border-radius: var(--radius-md);
}

.preview-content pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  padding: 15px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.preview-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.tab-header {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(232, 214, 255, 0.7);
  margin-bottom: 20px;
}

.tab {
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  font-size: 14px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab:hover {
  transform: scale(1.05);
}

.tab.active {
  background: #fff;
  color: var(--text-main);
  box-shadow: 0 8px 18px rgba(164, 118, 255, 0.35);
}

.auth-form {
  margin-top: 10px;
}

/* 响应式 */
@media (max-width: 900px) {
  .top-nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 15px;
  }

  .nav-center {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .nav-links {
    margin-right: 0;
    gap: 12px;
  }

  .nav-link {
    font-size: 13px;
    padding: 5px 10px;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .timer-card {
    max-width: 100%;
    padding: 35px 25px;
  }

  .timer {
    gap: 16px;
  }

  .time-block {
    min-width: 100px;
  }

  .time-number {
    font-size: 56px;
  }

  .time-sep {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 10px;
    margin: 0;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--radius-md);
  }

  .brand {
    justify-content: center;
  }

  .brand-text {
    font-size: 16px;
  }

  .nav-center {
    display: none;
  }

  .nav-links {
    width: 100%;
    justify-content: space-around;
    gap: 8px;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 12px;
    flex: 1;
    text-align: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .welcome-text {
    font-size: 12px;
  }

  /* 首页样式 */
  #homePage {
    padding: 20px 0 40px;
  }

  .intro-text {
    font-size: 14px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .timer-card {
    padding: 25px 15px;
    margin: 0 auto 30px;
    border-radius: var(--radius-lg);
  }

  .timer-label {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .timer {
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
  }

  .time-block {
    min-width: 70px;
    flex: 1;
    max-width: 80px;
  }

  .time-number {
    font-size: 36px;
  }

  .time-sep {
    font-size: 24px;
    padding: 0 4px;
    align-self: center;
  }

  .time-label {
    font-size: 12px;
    margin-top: 4px;
  }

  .timer-footer {
    font-size: 12px;
    margin-top: 15px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 10px;
  }

  .action-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
  }

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

  /* 内容列表 */
  .page-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .page-subtitle {
    font-size: 13px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .category-tabs {
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .category-tab {
    font-size: 12px;
    padding: 8px 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 5px;
  }

  .card {
    padding: 16px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-description {
    font-size: 11px;
  }

  .card-footer {
    font-size: 11px;
  }

  .card-actions {
    flex-direction: column;
    gap: 6px;
  }

  .card-action-btn {
    width: 100%;
    font-size: 11px;
    padding: 6px 10px;
  }

  /* 上传页面 */
  #uploadPage {
    padding: 20px 0;
  }

  .upload-panel {
    padding: 20px;
  }

  .field {
    font-size: 13px;
  }

  .field input,
  .field textarea {
    font-size: 14px;
    padding: 10px;
  }

  /* 三丽鸥背景图片在移动端缩小 */
  .sanrio-badge {
    width: 80px;
    height: 80px;
  }

  .sanrio-badge-1 {
    top: 8%;
    left: 2%;
  }

  .sanrio-badge-2 {
    bottom: 8%;
    right: 2%;
  }

  .sanrio-badge-3 {
    top: 25%;
    right: 5%;
  }

  /* 首页内容列表 */
  .home-content-list {
    margin-top: 50px;
    padding-top: 40px;
  }

  /* Modal */
  .modal-body {
    padding: 20px;
    margin: 10px;
    max-width: calc(100vw - 20px);
  }

  .preview-modal {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 40px);
  }

  .preview-content {
    max-height: 60vh;
    padding: 15px;
  }

  .preview-content iframe {
    min-height: 400px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 400px) {
  .time-number {
    font-size: 32px;
  }

  .time-sep {
    font-size: 20px;
  }

  .time-block {
    min-width: 60px;
    max-width: 70px;
  }

  .sanrio-badge {
    width: 60px;
    height: 60px;
  }
}
