:root {
  --primary-text: #5c4d43;
  --secondary-text: #8e7365;
  --accent-orange: #ff9f43;
  --accent-yellow: #ffda79;
  --bg-base: #fff5e6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-base);
  color: var(--primary-text);
}

[v-cloak] {
  display: none !important;
}

/* 登录界面样式 - 可爱明亮的主题 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-base);
  /* 橙、黄、白的明亮 Mesh Gradient 渐变 */
  background-image: 
    radial-gradient(at 0% 0%, hsla(38, 100%, 85%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(28, 100%, 80%, 1) 0px, transparent 50%),
    radial-gradient(at 40% 50%, hsla(0, 0%, 100%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(45, 100%, 85%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(20, 100%, 80%, 1) 0px, transparent 50%);
  background-size: cover;
  overflow: hidden;
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 40px 0 rgba(255, 159, 67, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 3.5rem 2.5rem;
  width: 90%;
  max-width: 380px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 50px 0 rgba(255, 159, 67, 0.25);
}

.avatar-placeholder {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  user-select: none;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

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

.title {
  font-size: 1.8rem;
  color: #d35400;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 2.5rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.input {
  width: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  border: 2px solid rgba(255, 159, 67, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-text);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}

.input::placeholder {
  color: #c8b7b0;
  font-weight: 400;
}

.input:focus {
  background: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.2);
}

.button {
  width: 100%;
  padding: 1.1rem;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
  transition: all 0.2s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
}

.button:active {
  transform: scale(0.96);
}

.error-shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ========================================= */
/* 主界面样式 - 小红书风格 */
/* ========================================= */
.main-app {
  min-height: 100vh;
  background-color: var(--bg-base);
  padding-bottom: 80px;
}

/* 头图区域 */
.hero-section {
  position: relative;
  width: 100%;
  height: 280px;
  background-color: #ffd8a8;
  overflow: hidden;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffc078 0%, #ff922b 100%);
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--bg-base) 0%, transparent 100%);
}

/* 头像与个人信息 */
.profile-section {
  position: relative;
  max-width: 800px;
  margin: -60px auto 30px;
  text-align: center;
  padding: 0 20px;
  z-index: 10;
}

.avatar-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  border-radius: 50%;
  padding: 6px;
  background: var(--bg-base);
  box-shadow: 0 8px 24px rgba(255, 159, 67, 0.2);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ffe8cc;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-text);
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--secondary-text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-text);
}

.stat-label {
  font-size: 0.85rem;
  color: #a89f91;
  margin-top: 4px;
}

/* 月份筛选器 */
.month-filter {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: #fff;
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 159, 67, 0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
}

/* 瀑布流容器 */
.waterfall-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.waterfall-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-post {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.timeline-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(255, 159, 67, 0.15);
}

.post-cover {
  position: relative;
  width: 100%;
  font-size: 0; /* 消除img底部间隙 */
}

.post-cover img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.multi-img-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.4);
  color: white;
  padding: 4px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  display: flex;
}

.multi-img-icon svg {
  width: 16px;
  height: 16px;
}

.post-info {
  padding: 12px 14px;
}

.post-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.post-content {
  font-size: 0.95rem;
  color: var(--secondary-text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #a89f91;
}

.post-date {
  font-weight: 500;
}

/* 详细图文界面 */
.detail-view {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

/* 翻页滑动动画 (进入时从右侧滑入，离开时向右侧滑出) */
.page-slide-enter-active, .page-slide-leave-active {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.page-slide-enter-from, .page-slide-leave-to {
  transform: translateX(100%);
}

/* 顶部滑动大图区 */
.detail-slider-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: #111; /* 黑底沉浸感 */
}

.floating-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.detail-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.detail-slider::-webkit-scrollbar {
  display: none;
}

.slider-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  max-height: 70vh; /* 避免图片占满全屏导致看不到文字 */
}

.slider-item img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain; /* 保证不裁剪，原比例完整显示 */
  display: block;
}

.slider-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* 下方文字内容区 */
.detail-content {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
}

.detail-text-area {
  padding: 20px;
}

.detail-title {
  font-size: 1.35rem;
  color: var(--primary-text);
  margin-bottom: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.detail-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--primary-text);
  white-space: pre-wrap;
  margin-bottom: 24px;
}

.detail-date {
  font-size: 0.85rem;
  color: #a89f91;
}

.bottom-actions {
  text-align: center;
  margin-top: 40px;
}

.logout-btn {
  padding: 10px 24px;
  border-radius: 20px;
  border: none;
  background: #f1f3f5;
  color: #868e96;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #ffc9c9;
  color: #e03131;
}

/* ========================================= */
/* 顶部搜索入口 & 全屏搜索扩展页 */
/* ========================================= */
.search-bar-wrapper {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(253, 251, 247, 0.8);
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  justify-content: center;
}
.search-bar-pill {
  width: 100%;
  max-width: 600px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.search-bar-pill:hover {
  background: rgba(0, 0, 0, 0.08);
}
.search-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #fdfbf7;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}
.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.search-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f1f3f5;
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}
.search-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--primary-text);
}
.clear-btn {
  background: #ccc; border: none; color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cancel-btn {
  background: none; border: none; font-size: 1rem; color: var(--secondary-text); cursor: pointer;
}
.search-filters {
  padding: 24px 16px;
}
.search-filters h3 {
  font-size: 1rem;
  color: var(--secondary-text);
  margin-bottom: 12px;
}
.month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--primary-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  background: #ff922b;
  color: #fff;
  border-color: #ff922b;
}

/* 电脑端轮播切换箭头 */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  color: white;
  transition: background 0.2s;
}
.slider-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
@media (max-width: 768px) {
  .slider-arrow { display: none; }
}

/* ========================================= */
/* 嵌入式搜索与筛选条 (高级悬浮版) */
/* ========================================= */
.elegant-search-section {
  max-width: 600px;
  margin: 0 auto 24px auto;
  padding: 0 16px;
  position: relative;
  z-index: 80;
}

.search-bar-container {
  position: relative;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 100px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.02);
  gap: 8px;
  transition: all 0.3s;
}

.search-input-box:focus-within {
  box-shadow: 0 8px 30px rgba(255, 146, 43, 0.15);
  border-color: rgba(255, 146, 43, 0.3);
}

.icon-search {
  color: #adb5bd;
  flex-shrink: 0;
}

.search-input-box input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  color: var(--primary-text);
}

.search-input-box input[type="text"]::placeholder {
  color: #ced4da;
}

.filter-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-toggle:hover { background: #f1f3f5; }
.filter-toggle.active {
  color: #ff922b;
  background: rgba(255, 146, 43, 0.1);
}

.search-action-btn {
  background: linear-gradient(135deg, #ffc078 0%, #ff922b 100%);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 146, 43, 0.2);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.search-action-btn:active {
  transform: scale(0.95);
}

/* Date Drawer */
.date-filter-drawer {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0,0,0,0.04);
  width: max-content;
  min-width: 320px;
  max-width: 90vw;
  animation: slideDown 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.drawer-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.04);
  border-left: 1px solid rgba(0,0,0,0.04);
}

.date-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-field {
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 12px;
  flex: 1;
}

.date-lbl {
  font-size: 0.7rem;
  color: #adb5bd;
  margin-bottom: 4px;
}

.date-field input[type="date"] {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  color: var(--primary-text);
  font-family: inherit;
  width: 100%;
}

.date-divider {
  color: #adb5bd;
  font-weight: 300;
}

.active-filter-tags {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 146, 43, 0.1);
  color: #e8590c;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

.close-tag {
  margin-left: 8px;
  cursor: pointer;
  opacity: 0.5;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}
.close-tag:hover {
  opacity: 1;
}

/* ========================================= */
/* 发布功能展开式悬浮按钮 (Radial Speed Dial) */
/* ========================================= */
.fab-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(253, 251, 247, 0.7);
  backdrop-filter: blur(4px);
  z-index: 80;
  animation: fadeIn 0.2s ease;
}

.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 85;
  width: 56px;
  height: 56px;
}

@media (max-width: 768px) {
  .fab-container { bottom: 24px; right: 24px; }
}

.fab-main {
  position: absolute;
  top: 0; left: 0;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffc078 0%, #ff922b 100%);
  color: white;
  border: none;
  box-shadow: 0 8px 24px rgba(255, 146, 43, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
  z-index: 2;
}

.fab-main.is-open {
  transform: rotate(45deg);
  background: #fff;
  color: #ff922b;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.fab-menu {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fab-menu.is-open {
  pointer-events: auto;
}

.fab-action {
  position: absolute;
  top: 6px; left: 6px; /* center relative to 56x56 main */
  width: 44px; height: 44px;
  opacity: 0;
  transform: scale(0.5); /* start at center */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-menu.is-open .fab-action {
  opacity: 1;
}

/* Radial translations */
.fab-menu.is-open .fab-action.action-1 { transform: translate(0, -90px) scale(1); }      /* Top: Custom */
.fab-menu.is-open .fab-action.action-2 { transform: translate(-70px, -70px) scale(1); }  /* Top-Left: Nine-Grid */
.fab-menu.is-open .fab-action.action-3 { transform: translate(-90px, 0) scale(1); }      /* Left: Normal */

/* Label positioning for radial layout */
.fab-label {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  white-space: nowrap;
}

/* Action 1 (Top) -> label on left */
.fab-action.action-1 .fab-label { right: calc(100% + 12px); top: 50%; transform: translateY(-50%); }
/* Action 2 (Top-Left) -> label on top */
.fab-action.action-2 .fab-label { bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); }
/* Action 3 (Left) -> label on top */
.fab-action.action-3 .fab-label { bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); }

.fab-mini-btn {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff922b;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.fab-mini-btn:hover { transform: scale(1.1); background: #fff4e6; }
.fab-mini-btn:active { transform: scale(0.9); }

/* ========================================= */
/* 首页瀑布流中的九宫格样式 */
/* ========================================= */
.post-nine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.post-nine-grid[data-count="1"] { grid-template-columns: 1fr; }
.post-nine-grid[data-count="2"], .post-nine-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }

.grid-cover-cell {
  aspect-ratio: 1;
  background: #f8f9fa;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.grid-cover-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.grid-cover-cell:hover img {
  transform: scale(1.05);
}

/* ========================================= */
/* 发布图文弹窗 (临时发布) */
/* ========================================= */
.publish-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.publish-container {
  width: 100%;
  max-width: 600px;
  height: 90vh; /* 从底部滑出的高度 */
  background: #fff;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUpPublish 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

@media (min-width: 600px) {
  .publish-overlay { align-items: center; }
  .publish-container { height: 80vh; border-radius: 24px; }
}

@keyframes slideUpPublish {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.publish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.publish-header .cancel-btn {
  background: none; border: none; color: #888; font-size: 1rem; cursor: pointer;
}
.publish-header .publish-title {
  font-weight: 600; font-size: 1.1rem; color: var(--primary-text);
}
.publish-header .submit-btn {
  background: #ff922b; color: white; border: none; border-radius: 20px; padding: 6px 16px; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.publish-header .submit-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.publish-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.image-upload-section {
  margin-bottom: 24px;
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.image-preview-item, .upload-trigger {
  width: calc((100% - 24px) / 3); /* 3列排布 */
  aspect-ratio: 1;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 600px) {
  .image-preview-item, .upload-trigger {
    width: 100px;
    height: 100px;
  }
}

.image-preview-item img {
  width: 100%; height: 100%; object-fit: cover;
}

.remove-img-btn {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.5);
  color: white; border: none;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.upload-trigger {
  background: #f8f9fa;
  border: 1px dashed #ced4da;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; gap: 4px; color: #adb5bd; font-size: 0.85rem; transition: background 0.2s;
}
.upload-trigger:hover { background: #f1f3f5; }

.text-input-section {
  display: flex; flex-direction: column;
}

.publish-title-input {
  border: none; outline: none; font-size: 1.2rem; font-weight: 600; padding: 12px 0; color: var(--primary-text);
  background: transparent;
}
.publish-title-input::placeholder { color: #ced4da; font-weight: 500; }

.divider-line {
  height: 1px; background: rgba(0,0,0,0.05); margin: 8px 0 16px 0;
}

.publish-content-input {
  border: none; outline: none; font-size: 1rem; color: var(--primary-text); resize: none; font-family: inherit; line-height: 1.6;
  background: transparent;
}
.publish-content-input::placeholder { color: #ced4da; }

/* ========================================= */
/* 九宫格超过9张的遮罩 & 自定义布局拼图 (Custom Grid) */
/* ========================================= */
.more-images-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}

.post-custom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
}

.post-custom-grid .grid-cover-cell {
  aspect-ratio: auto !important;
}

/* 发布界面 - 自定义拼图编辑区 */
.custom-grid-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.custom-grid-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
}
.controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.controls-row input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.controls-actions {
  display: flex;
  gap: 8px;
}
.merge-btn, .reset-btn, .confirm-layout-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}
.merge-btn { background: #ff922b; color: white; }
.reset-btn { background: #e9ecef; color: #495057; }
.confirm-layout-btn { background: #20c997; color: white; }
.merge-btn:hover, .reset-btn:hover, .confirm-layout-btn:hover { opacity: 0.8; }

.fill-hint {
  font-size: 0.9rem;
  color: #ff922b;
  font-weight: 600;
  margin: 0;
}

.custom-grid-editor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #e9ecef;
  padding: 4px;
  border-radius: 8px;
  width: 70%;
  margin: 0 auto;
}

.custom-slot {
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.custom-slot.selected {
  border: 2px solid #ff922b;
  background: #fff4e6;
}

.slot-placeholder {
  font-size: 0.9rem;
  color: #adb5bd;
  font-weight: 500;
  pointer-events: none;
}
.custom-slot.selected .slot-placeholder { color: #ff922b; }

.custom-slot img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

.custom-slot.has-image:hover::after {
  content: '替换';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 2;
}
/* ========================================= */
/* 圆环 SVG 文字标签 */
/* ========================================= */
.curved-label {
    position: absolute;
    top: -28px;
    left: -28px;
    width: 100px;
    height: 100px;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.8));
}
.curved-label text {
    fill: #e8590c;
    font-size: 15px;
    font-weight: 800;
    font-family: system-ui, -apple-system, sans-serif;
}
/* 隐藏旧版文字标签 */
.fab-label { display: none !important; }

/* ========================================= */
/* 自定义排版高级 UI 控制区 */
/* ========================================= */
.controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.controls-title {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}
.stepper-control {
  display: flex;
  align-items: center;
  background: #f1f3f5;
  border-radius: 6px;
  overflow: hidden;
}
.stepper-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  font-size: 1.2rem;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper-btn:hover { background: #e9ecef; }
.stepper-value {
  width: 30px;
  text-align: center;
  font-weight: 700;
  color: #ff922b;
}
.edit-hint {
  font-size: 0.85rem;
  color: #868e96;
  margin: 0;
  padding: 0 4px;
}

/* 拖拽合并交互 */
.custom-slot.is-drag-preview {
  background: #fff4e6;
  border: 2px dashed #ff922b;
}

.custom-slot.is-img-drag-target {
  border: 2px solid #ff922b;
  opacity: 0.8;
  transform: scale(0.95);
}

.image-preview-item.is-drag-target {
  border: 2px dashed #ff922b;
  opacity: 0.7;
  transform: scale(0.95);
}


/* ========================================= */
/* CAT PAW FAB COMPLETE REDESIGN */
/* ========================================= */
.fab-container { width: 64px !important; height: 64px !important; }
.fab-main { 
    width: 64px !important; height: 64px !important; 
    border-radius: 50% !important; /* Perfect circle when closed */
    background: linear-gradient(135deg, #ffc078 0%, #ff922b 100%) !important;
    box-shadow: 0 8px 24px rgba(255, 146, 43, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: visible !important;
}

/* When open, container becomes invisible to let SVG paw pad shine */
.fab-main.is-open {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important; /* No rotation on the container */
}

/* State 1: The Circle Icon */
.fab-circle-state {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    color: white;
}
.fab-main.is-open .fab-circle-state {
    opacity: 0; transform: scale(0.5) rotate(90deg);
}

/* State 2: The Paw Pad SVG */
.fab-paw-state {
    position: absolute; inset: -5px; /* slightly larger */
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #ff922b;
    filter: drop-shadow(0 4px 12px rgba(255, 146, 43, 0.4));
}
.fab-main.is-open .fab-paw-state {
    opacity: 1;
    transform: scale(1) rotate(-25deg); /* Pad angled slightly left */
}

/* ========================================= */
/* FINAL ORANGE PAW REDESIGN */
/* ========================================= */
.fab-container { width: 64px !important; height: 64px !important; }

/* Main Button (Circle when closed, invisible when open to show massive pad) */
.fab-main { 
    width: 64px !important; height: 64px !important; 
    border-radius: 50% !important;
    background: linear-gradient(135deg, #ffc078 0%, #ff922b 100%) !important;
    box-shadow: 0 8px 24px rgba(255, 146, 43, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: visible !important;
    border: none !important;
}

.fab-main.is-open {
    background: transparent !important;
    box-shadow: none !important;
    transform: rotate(45deg) !important;
}

/* State 1: Default Circle with + */
.fab-circle-state {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    color: white;
}
.fab-main.is-open .fab-circle-state {
    opacity: 0; transform: scale(0.5);
}

/* State 2: Massive Paw Pad when open */
.fab-paw-open-state {
    position: absolute; inset: -15px; /* Extremely large to scale up the pad */
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg); /* Start small and point left */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #ff922b;
    filter: drop-shadow(0 6px 16px rgba(255, 146, 43, 0.4));
}
.fab-main.is-open .fab-paw-open-state {
    opacity: 1;
    transform: scale(1.2) rotate(-90deg); /* Point left, 1.2x larger */
}

/* Hide text labels entirely for now */
.fab-label { display: none !important; }
.curved-label { display: none !important; }

/* Toe Beans (Action Buttons) */
.fab-action { 
    width: 45px !important; height: 48px !important; /* 1.25x fatter minor axis */
    top: 8px !important; left: 10px !important;
    z-index: 10;
}

.fab-mini-btn {
    width: 100% !important; height: 100% !important;
    border-radius: 50% 50% 45% 45% !important; /* Teardrop shape */
    background: #ff922b !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 146, 43, 0.4) !important;
    transition: transform 0.2s, filter 0.2s !important;
    border: none !important;
}
.fab-mini-btn:hover { filter: brightness(1.1); }

/* Toe Positions forming a beautiful paw around the massive pad */
.fab-menu.is-open .fab-action.action-3 { transform: translate(-70px, -2px) scale(1) !important; }
.fab-menu.is-open .fab-action.action-2 { transform: translate(-48px, -48px) scale(1) !important; }
.fab-menu.is-open .fab-action.action-1 { transform: translate(-2px, -70px) scale(1) !important; }

/* Toe Rotations */
.fab-action.action-3 .fab-mini-btn { transform: rotate(-85deg); }
.fab-action.action-2 .fab-mini-btn { transform: rotate(-45deg); }
.fab-action.action-1 .fab-mini-btn { transform: rotate(-5deg); }

/* Hover scale combined with rotation */
.fab-action.action-3 .fab-mini-btn:hover { transform: rotate(-85deg) scale(1.1); }
.fab-action.action-2 .fab-mini-btn:hover { transform: rotate(-45deg) scale(1.1); }
.fab-action.action-1 .fab-mini-btn:hover { transform: rotate(-5deg) scale(1.1); }

/* Ensure legacy elements are hidden */
.fab-paw-closed-state { display: none !important; }
