/* ===== 我的故事档案 53 ===== */
.sa-page {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sa-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.sa-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sa-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(220, 200, 255, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 85%, rgba(200, 190, 250, 0.45) 0%, transparent 50%),
    linear-gradient(180deg, rgba(245, 240, 255, 0.82) 0%, rgba(235, 228, 252, 0.88) 100%);
  pointer-events: none;
}

.sa-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 24px 12px;
  overflow-y: auto;
}

/* ===== 顶部标题 ===== */
.sa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sa-title {
  font-size: 28px;
  font-weight: 900;
  color: #4C1D95;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(167, 139, 250, 0.35);
}

.sa-subtitle {
  font-size: 13px;
  color: #7C6BAE;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== 面板通用 ===== */
.sa-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 246, 255, 0.92) 100%);
  border: 1px solid rgba(167, 139, 250, 0.25);
  box-shadow:
    0 10px 30px rgba(124, 92, 200, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sa-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #4C1D95;
}

.sa-panel-icon-text {
  font-size: 18px;
  line-height: 1;
}

.sa-panel-more {
  font-size: 12px;
  font-weight: 600;
  color: #8B7BC8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sa-panel-more:hover {
  color: #4C1D95;
  background: rgba(167, 139, 250, 0.15);
}

/* ===== 主体布局 ===== */
.sa-body {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

/* 左侧导航 */
.sa-nav {
  width: 190px;
  flex-shrink: 0;
}

.sa-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}

.sa-nav-item:hover {
  background: rgba(167, 139, 250, 0.12);
  transform: translateX(3px);
}

.sa-nav-item.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(196, 181, 253, 0.22));
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.18);
}

.sa-nav-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sa-nav-name {
  font-size: 13px;
  font-weight: 700;
  color: #5B4B8A;
}

.sa-nav-item.active .sa-nav-name {
  color: #4C1D95;
}

/* 中间主区域 */
.sa-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 标签栏 */
.sa-tabbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 246, 255, 0.92) 100%);
  border: 1px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 8px 24px rgba(124, 92, 200, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sa-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.sa-tab {
  padding: 7px 14px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  color: #7C6BAE;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-tab:hover {
  transform: translateY(-2px);
  color: #4C1D95;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.18);
}

.sa-tab.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.sa-search-box {
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  transition: all 0.25s ease;
}

.sa-search-box:focus-within {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.sa-search-input {
  width: 130px;
  height: 34px;
  padding: 0 12px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #4C1D95;
}

.sa-search-input::placeholder {
  color: #B3A8D8;
}

.sa-search-btn {
  width: 38px;
  height: 34px;
  border: none;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-search-btn:hover {
  filter: brightness(1.1);
}

.sa-filter-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  color: #7C6BAE;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-filter-btn:hover {
  color: #4C1D95;
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

/* 故事卡片网格 */
.sa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sa-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: 0 8px 22px rgba(124, 92, 200, 0.12);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sa-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 16px 36px rgba(124, 92, 200, 0.25);
}

.sa-card-cover {
  position: relative;
  overflow: hidden;
}

.sa-card-cover img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.sa-card:hover .sa-card-cover img {
  transform: scale(1.06);
}

.sa-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(124, 58, 237, 0.92));
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.sa-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}

.sa-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #3B2A6E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa-card-meta {
  font-size: 11px;
  color: #8B7BC8;
  font-weight: 600;
}

.sa-card-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-progress-bar {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.2);
  overflow: hidden;
}

.sa-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #A78BFA, #8B5CF6);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.sa-progress-text {
  font-size: 10px;
  font-weight: 700;
  color: #7C6BAE;
  flex-shrink: 0;
}

.sa-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.sa-card-growth {
  font-size: 11px;
  font-weight: 800;
  color: #D97706;
}

.sa-card-btn {
  padding: 5px 12px;
  border-radius: 12px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-card-btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35);
}

.sa-card-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
  filter: brightness(1.08);
}

/* 右侧栏 */
.sa-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 故事统计 */
.sa-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sa-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-stat-item:hover {
  transform: translateY(-2px);
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.sa-stat-value {
  font-size: 20px;
  font-weight: 900;
  color: #7C3AED;
}

.sa-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #7C6BAE;
}

/* 继续创作 */
.sa-create-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 14px;
  transition: all 0.3s ease;
}

.sa-create-body:hover .sa-create-img {
  transform: scale(1.03);
}

.sa-create-img {
  width: 100%;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(167, 139, 250, 0.25);
  transition: transform 0.4s ease;
}

.sa-create-text {
  font-size: 12px;
  color: #7C6BAE;
  font-weight: 600;
  text-align: center;
}

/* 今日推荐 */
.sa-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-recommend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.16);
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-recommend-item:hover {
  transform: translateX(4px);
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(139, 92, 246, 0.35);
}

.sa-recommend-item img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.sa-recommend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sa-recommend-name {
  font-size: 12px;
  font-weight: 800;
  color: #3B2A6E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa-recommend-meta {
  font-size: 10px;
  color: #8B7BC8;
  font-weight: 600;
}

/* ===== 按钮 ===== */
.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  border-radius: 18px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sa-btn-block {
  width: 100%;
}

.sa-btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.sa-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.55);
  filter: brightness(1.08);
}

.sa-btn-primary:active {
  transform: translateY(1px);
}

/* ===== 底部 ===== */
.sa-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 246, 255, 0.92) 100%);
  border: 1px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 10px 30px rgba(124, 92, 200, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.sa-footer-title {
  font-size: 15px;
  font-weight: 800;
  color: #4C1D95;
}

.sa-inspire-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.sa-inspire-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: 0 6px 16px rgba(124, 92, 200, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sa-inspire-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 12px 28px rgba(124, 92, 200, 0.22);
}

.sa-inspire-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.sa-inspire-name {
  font-size: 12px;
  font-weight: 700;
  color: #3B2A6E;
  text-align: center;
  padding: 0 6px 8px;
}

.sa-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #7C6BAE;
}

.sa-star {
  color: #D97706;
  font-size: 12px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* ===== Toast 提示 ===== */
.sa-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.95), rgba(124, 58, 237, 0.95));
  border: 1px solid rgba(196, 181, 253, 0.4);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(76, 29, 149, 0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}

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

/* ===== 响应式 ===== */
@media (max-width: 1300px) {
  .sa-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .sa-sidebar {
    width: 270px;
  }
}

@media (max-width: 1050px) {
  .sa-body {
    flex-direction: column;
  }

  .sa-nav {
    width: 100%;
  }

  .sa-nav-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .sa-sidebar {
    width: 100%;
  }

  .sa-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sa-inspire-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== 真实数据：我的 AI 创作 ===== */
.sa-real-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 0;
  font-size: 15px;
  font-weight: 700;
  color: #FFE5A0;
  letter-spacing: 0.5px;
}
.sa-real-head-star { font-size: 16px; }

.sa-card-real .sa-card-cover { position: relative; }
.sa-card-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 16px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.sa-card-real .sa-card-foot { gap: 8px; }
.sa-card-real .sa-card-btn + .sa-card-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
