/* ============================================
   樱花表白墙 — 主样式表
   Design: Glassmorphism + Sakura Pink
   ============================================ */

/* === CSS Variables (Light + Dark) === */
:root {
  /* Colors */
  --sakura-pink: #f8a5c2;
  --sakura-deep: #e16b8c;
  --sakura-light: #fef0f5;
  --sakura-white: #fff5f7;
  --text-primary: #4a3040;
  --text-secondary: #8b6b7a;
  --text-muted: #b0959f;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(245, 150, 170, 0.25);
  --card-shadow: 0 8px 32px rgba(245, 150, 170, 0.12);
  --card-hover-shadow: 0 12px 40px rgba(245, 150, 170, 0.25);
  --nav-bg: rgba(255, 255, 255, 0.80);
  --body-bg: linear-gradient(135deg, #fef0f5 0%, #fff0f5 30%, #fde8ef 60%, #fff5f7 100%);
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-border: rgba(225, 107, 140, 0.3);
  --btn-primary: linear-gradient(135deg, #f8a5c2, #e16b8c);
  --btn-hover: linear-gradient(135deg, #f598b8, #d45a7b);
  --tag-bg: rgba(245, 150, 170, 0.15);
  --tag-active-bg: linear-gradient(135deg, #e16b8c, #f8a5c2);
  --tag-active-text: #fff;
  --divider: rgba(225, 107, 140, 0.15);
  --like-color: #ff6b81;
  --like-active: #ff2d55;
  --gonggao-bg: rgba(255, 220, 230, 0.6);
  --petal-color: #f8c8d8;
  --overlay-bg: rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] {
  --sakura-pink: #d47898;
  --sakura-deep: #c45878;
  --sakura-light: #2a1f24;
  --sakura-white: #1e181a;
  --text-primary: #e8d5dc;
  --text-secondary: #b8a0aa;
  --text-muted: #7a6570;
  --card-bg: rgba(40, 28, 34, 0.80);
  --card-border: rgba(200, 100, 130, 0.20);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(30, 20, 24, 0.85);
  --body-bg: linear-gradient(135deg, #1a1216 0%, #20161c 30%, #231820 60%, #1e1519 100%);
  --input-bg: rgba(40, 28, 34, 0.8);
  --input-border: rgba(200, 100, 130, 0.25);
  --btn-primary: linear-gradient(135deg, #c45878, #a0445e);
  --btn-hover: linear-gradient(135deg, #d47898, #b0506e);
  --tag-bg: rgba(200, 100, 130, 0.15);
  --tag-active-bg: linear-gradient(135deg, #c45878, #d47898);
  --divider: rgba(200, 130, 150, 0.12);
  --like-color: #ff6b81;
  --like-active: #ff2d55;
  --gonggao-bg: rgba(60, 30, 40, 0.5);
  --petal-color: rgba(200, 120, 150, 0.3);
  --overlay-bg: rgba(0, 0, 0, 0.7);
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--sakura-pink);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--sakura-deep); }

/* === Sakura Petal Animation === */
.sakura-petals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -60px;
  width: 18px;
  height: 18px;
  background: var(--petal-color);
  border-radius: 150% 0 150% 0;
  animation: petal-fall linear infinite;
  opacity: 0.7;
}

.petal:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: 0s;   width: 16px; height: 16px; }
.petal:nth-child(2)  { left: 12%; animation-duration: 15s; animation-delay: 2s;   width: 20px; height: 20px; }
.petal:nth-child(3)  { left: 22%; animation-duration: 11s; animation-delay: 4s;   width: 14px; height: 14px; }
.petal:nth-child(4)  { left: 30%; animation-duration: 14s; animation-delay: 1s;   width: 22px; height: 22px; }
.petal:nth-child(5)  { left: 38%; animation-duration: 13s; animation-delay: 6s;   width: 16px; height: 16px; }
.petal:nth-child(6)  { left: 48%; animation-duration: 16s; animation-delay: 3s;   width: 18px; height: 18px; }
.petal:nth-child(7)  { left: 55%; animation-duration: 10s; animation-delay: 7s;   width: 20px; height: 20px; }
.petal:nth-child(8)  { left: 62%; animation-duration: 14s; animation-delay: 5s;   width: 15px; height: 15px; }
.petal:nth-child(9)  { left: 70%; animation-duration: 12s; animation-delay: 8s;   width: 19px; height: 19px; }
.petal:nth-child(10) { left: 78%; animation-duration: 15s; animation-delay: 2s;   width: 17px; height: 17px; }
.petal:nth-child(11) { left: 85%; animation-duration: 11s; animation-delay: 9s;   width: 21px; height: 21px; }
.petal:nth-child(12) { left: 92%; animation-duration: 13s; animation-delay: 4s;   width: 16px; height: 16px; }
.petal:nth-child(13) { left: 18%; animation-duration: 17s; animation-delay: 10s;  width: 14px; height: 14px; }
.petal:nth-child(14) { left: 42%; animation-duration: 12s; animation-delay: 6s;   width: 23px; height: 23px; }
.petal:nth-child(15) { left: 68%; animation-duration: 14s; animation-delay: 1s;   width: 18px; height: 18px; }

@keyframes petal-fall {
  0% {
    transform: translateY(-60px) rotate(0deg) scale(0.9);
    opacity: 0.8;
  }
  25% {
    transform: translateY(25vh) rotate(90deg) translateX(30px) scale(1.1);
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(-20px) scale(1);
    opacity: 0.6;
  }
  75% {
    transform: translateY(75vh) rotate(270deg) translateX(25px) scale(0.9);
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-15px) scale(0.7);
    opacity: 0;
  }
}

/* === Main Container === */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 12px 80px;
}

/* === Navigation Bar === */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 16px;
  margin: 0 -12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sakura-pink);
}

.nav-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sakura-deep);
  letter-spacing: 1px;
}

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

.nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--sakura-light);
  color: var(--sakura-deep);
  border-color: var(--sakura-pink);
  transform: scale(1.05);
}

.nav-btn.active {
  background: var(--sakura-deep);
  color: #fff;
  border-color: var(--sakura-deep);
}

/* === Banner / Hero === */
.hero-banner {
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

/* === Notice Marquee === */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 8px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
}

.notice-bar .notice-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.notice-bar marquee {
  flex: 1;
  cursor: pointer;
}

/* === Tab Bar === */
.tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover {
  background: var(--tag-bg);
  color: var(--sakura-deep);
}

.tab-btn.active {
  background: var(--tag-active-bg);
  color: var(--tag-active-text);
  box-shadow: 0 4px 14px rgba(225, 107, 140, 0.3);
}

/* === Search Box === */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  padding: 4px 8px;
}

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

.search-type {
  display: flex;
  gap: 4px;
  align-items: center;
}

.search-type label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.search-type input[type="radio"] {
  accent-color: var(--sakura-deep);
}

.search-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: var(--btn-primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.search-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 107, 140, 0.3);
}

/* === Pinned Posts === */
.pinned-section {
  margin-bottom: 12px;
}

.pinned-label {
  font-size: 12px;
  color: var(--sakura-deep);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* === Post Card (Glassmorphism) === */
.post-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--btn-primary);
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover::before { opacity: 1; }

.post-card.pinned {
  border-color: var(--sakura-deep);
}

.post-card.pinned::before {
  opacity: 1;
  background: linear-gradient(135deg, #f8a5c2, #e16b8c, #f8a5c2);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.post-pin-badge {
  font-size: 11px;
  background: var(--tag-active-bg);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

.post-to strong {
  color: var(--sakura-deep);
  font-size: 15px;
}

.post-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 12px;
  word-break: break-word;
}

.post-body.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-expand {
  color: var(--sakura-deep);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
}

.post-expand:hover { text-decoration: underline; }

.post-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--sakura-light);
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}

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

.post-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.post-author {
  color: var(--sakura-deep);
  font-weight: 600;
}

.post-time {
  font-size: 11px;
}

/* === Like Button === */
.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--like-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  backdrop-filter: blur(10px);
}

.like-btn:hover {
  background: rgba(255, 107, 129, 0.1);
  border-color: var(--like-color);
  transform: scale(1.04);
}

.like-btn.liked {
  background: var(--like-active);
  color: #fff;
  border-color: var(--like-active);
  animation: heart-pop 0.4s ease;
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.like-count {
  font-size: 12px;
}

/* === Comments Section === */
.comments-section {
  margin-top: 12px;
  border-top: 1px solid var(--divider);
  padding-top: 10px;
}

.comments-toggle {
  font-size: 12px;
  color: var(--sakura-deep);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  transition: background 0.2s;
}
.comments-toggle:hover { background: var(--tag-bg); }

.comment-list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.comment-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--input-bg);
  border-radius: 10px;
  font-size: 13px;
}

.comment-item .cmt-author {
  color: var(--sakura-deep);
  font-weight: 700;
  font-size: 12px;
}

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

.comment-item .cmt-body {
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.5;
  word-break: break-word;
}

.comment-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.comment-form input {
  flex: 1;
  min-width: 60px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.comment-form input:focus {
  border-color: var(--sakura-deep);
}

.comment-form .cmt-submit {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: var(--btn-primary);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

/* === Mobile FAB (Floating Action Button) === */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--btn-primary);
  color: #fff;
  font-size: 22px;
  border: none;
  box-shadow: 0 6px 20px rgba(225, 107, 140, 0.4);
  cursor: pointer;
  z-index: 150;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(225, 107, 140, 0.5);
}

@media (max-width: 768px) {
  .mobile-fab { display: flex; }
}

/* === Announcement Card === */
.gonggao-card {
  background: var(--gonggao-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.gonggao-card .gg-title {
  font-weight: 700;
  color: var(--sakura-deep);
  margin-bottom: 8px;
  font-size: 15px;
}

.gonggao-card hr {
  border: none;
  border-top: 1px dashed var(--divider);
  margin: 10px 0;
}

/* === Photo Share Card === */
.photo-card .photo-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 200px;
  margin-bottom: 10px;
}

.photo-card .photo-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.photo-card .photo-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  backdrop-filter: blur(6px);
}

/* === Pagination === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 30px;
}

.page-btn {
  min-width: 44px;
  height: 38px;
  border-radius: 19px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  padding: 0 14px;
  font-family: inherit;
}

.page-btn:hover {
  background: var(--sakura-light);
  color: var(--sakura-deep);
  border-color: var(--sakura-pink);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 8px;
  cursor: pointer;
  font-weight: 600;
}

.page-info:hover { color: var(--sakura-deep); }

/* === Back to Top === */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--sakura-deep);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
}

/* === Modal Overlay === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-dialog h3 {
  font-size: 20px;
  color: var(--sakura-deep);
  margin-bottom: 16px;
  text-align: center;
}

.modal-dialog input,
.modal-dialog textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  margin-bottom: 12px;
  font-family: inherit;
  transition: border-color 0.2s ease;
  resize: vertical;
}

.modal-dialog input:focus,
.modal-dialog textarea:focus {
  border-color: var(--sakura-deep);
  box-shadow: 0 0 0 3px rgba(225, 107, 140, 0.1);
}

.modal-dialog textarea {
  min-height: 120px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-btn {
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-btn.primary {
  background: var(--btn-primary);
  color: #fff;
}

.modal-btn.primary:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}

.modal-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.modal-btn.secondary:hover {
  background: var(--sakura-light);
}

.modal-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-captcha img {
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--input-border);
}

/* === Loader === */
.loader {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loader .spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--card-border);
  border-top-color: var(--sakura-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

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

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 60px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state p {
  font-size: 15px;
}

/* === User Info Panel === */
.user-panel {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.user-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.user-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.user-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 3px solid var(--sakura-pink);
  object-fit: cover;
}

.user-card .nickname {
  font-size: 22px;
  font-weight: 700;
  color: var(--sakura-deep);
  margin-bottom: 4px;
}

.user-card .info-row {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.user-card .info-row strong {
  color: var(--text-primary);
}

.user-card audio {
  width: 100%;
  margin: 12px 0;
  border-radius: 8px;
}

.user-card .close-panel {
  margin-top: 16px;
  padding: 10px 28px;
  border-radius: 20px;
  border: none;
  background: var(--btn-primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* === Toast === */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sakura-deep);
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 30px rgba(225, 107, 140, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === Responsive === */
@media (max-width: 480px) {
  .app-container {
    padding: 0 8px 60px;
  }
  .nav-bar {
    padding: 8px 12px;
    margin: 0 -8px;
  }
  .nav-title { font-size: 16px; }
  .post-card { padding: 14px; border-radius: 14px; }
  .hero-banner { height: 130px; border-radius: 12px; }
  .tab-btn { padding: 7px 14px; font-size: 13px; }
  .modal-dialog { padding: 20px; }
}

@media (min-width: 768px) {
  .app-container { max-width: 620px; }
  .post-card { padding: 22px; }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
  .petal { animation: none; display: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
