
:root{
  /* 深色背景系统 */
  --rs-bg-primary:#0f172a;        /* 深海蓝黑 - 主背景 */
  --rs-bg-secondary:#1e293b;      /* 深灰蓝 - 次级背景 */
  --rs-bg-card:#2C3D85;           /* 深蓝紫 - 卡片背景 */
  --rs-bg:#0f172a;
  --rs-bg-light:#1e293b;
  
  /* 米色强调色系统 */
  --rs-accent-cream:#F7F4EA;      /* 米色 - 主要强调 */
  --rs-accent-cream-dark:#E8E3D5; /* 深米色 */
  --rs-accent-cream-light:#FFFEF8;/* 浅米色 */
  --rs-blue-primary:#F7F4EA;      /* 米色 */
  --rs-blue-light:#FFFEF8;        /* 浅米色 */
  --rs-blue-dark:#E8E3D5;         /* 深米色 */
  --rs-primary:#F7F4EA;
  --rs-primary-light:#FFFEF8;
  --rs-primary-dark:#E8E3D5;
  --rs-gradient-blue:linear-gradient(135deg, #2C3D85 0%, #1e293b 100%);
  
  /* 文字色 */
  --rs-text-primary:#f8fafc;      /* 近白 - 主文字 */
  --rs-text-secondary:#cbd5e1;    /* 浅灰 - 次要文字 */
  --rs-text-muted:#94a3b8;        /* 灰色 - 辅助文字 */
  --rs-text:#f8fafc;
  --rs-sub:#cbd5e1;
  --rs-text-light:#94a3b8;
  
  /* 边框和分割 */
  --rs-border:#334155;            /* 中灰蓝 */
  --rs-divider:rgba(148, 163, 184, 0.1);
  --rs-line:#334155;
  
  /* 卡片 */
  --rs-card:#1e293b;
  --rs-card-hover:#1e3a8a;
  
  /* 强调色 */
  --rs-accent:#3b82f6;
  --rs-accent2:#10b981;
  --rs-success:#10b981;
  --rs-warning:#f59e0b;
  --rs-danger:#ef4444;
  
  /* 阴影 */
  --rs-shadow-sm:0 2px 8px rgba(0, 0, 0, 0.3);
  --rs-shadow-md:0 4px 16px rgba(0, 0, 0, 0.4);
  --rs-shadow-lg:0 8px 32px rgba(0, 0, 0, 0.5);
  --rs-glow-blue:0 0 20px rgba(59, 130, 246, 0.4);
  --rs-shadow:0 4px 16px rgba(0, 0, 0, 0.4);
  
  /* 圆角 */
  --rs-radius:16px;
  --rs-radius-sm:12px;
  --rs-radius-lg:24px;
  --rs-radius-xl:32px;
  
  --rs-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color-scheme: dark;
}

*{box-sizing:border-box}
html{
  scroll-behavior: smooth;
}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--rs-font);
  color:#1e293b;
  background:#ffffff;
}

/* Preview 页面专用深色主题 */
body:has(.rs-preview-layout) {
  color:var(--rs-text-primary);
  background:var(--rs-bg-primary);
}

/* loading */
.rs-loading{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#64748b}
.rs-spinner{width:34px;height:34px;border-radius:999px;border:3px solid rgba(15,23,42,.15);border-top-color:var(--rs-accent);animation:rsSpin 1s linear infinite}
@keyframes rsSpin{to{transform:rotate(360deg)}}

/* ============================================
   PREVIEW 页面 - 深色奢华风格
   ============================================ */

/* Preview 整体布局 */
.rs-preview-layout {
  display: flex;
  min-height: 100vh;
  background: var(--rs-bg-primary);
}

/* 左侧固定导航栏 */
.rs-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--rs-bg-secondary);
  padding: 48px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--rs-border);
  z-index: 50;
}

.rs-sidebar-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rs-divider);
  margin-bottom: 24px;
}

.rs-sidebar-video {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rs-divider);
  margin-bottom: 24px;
}

.rs-sidebar-video-title {
  color: #F7F4EA;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  text-align: center;
}

.rs-sidebar-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.rs-sidebar-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rs-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #F7F4EA;
  box-shadow: 0 0 20px rgba(247, 244, 234, 0.3);
  object-fit: cover;
  margin: 0 auto;
}

.rs-avatar-fallback {
  background: var(--rs-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rs-text-muted);
}

.rs-name {
  font-size: 28px;
  font-weight: 900;
  color: var(--rs-text-primary);
  margin: 20px 0 8px 0;
  line-height: 1.2;
}

.rs-title {
  font-size: 16px;
  color: #F7F4EA;
  font-weight: 500;
  margin: 0;
}

/* 侧边栏导航 */
.rs-sidebar-nav {
  margin-bottom: 32px;
}

.rs-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--rs-text-secondary);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.rs-nav-link i {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.rs-nav-link:hover {
  color: #F7F4EA;
  background: rgba(247, 244, 234, 0.1);
  border-left-color: #F7F4EA;
}

.rs-nav-link.active {
  color: #F7F4EA;
  background: rgba(247, 244, 234, 0.15);
  border-left-color: #F7F4EA;
  font-weight: 600;
}

/* 侧边栏联系方式 */
.rs-sidebar-contact {
  padding-top: 24px;
  border-top: 1px solid var(--rs-divider);
}

.rs-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--rs-text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.rs-contact-link i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.rs-contact-link:hover {
  color: var(--rs-blue-light);
}

/* 主内容区 */
.rs-main-content {
  margin-left: 280px;
  flex: 1;
  padding: 48px 64px;
  max-width: calc(100% - 280px);
}

/* 折叠式内容模块 */
.rs-collapsible-section {
  background: var(--rs-bg-secondary);
  border: 1px solid var(--rs-border);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rs-collapsible-section:hover {
  border-color: #F7F4EA;
  box-shadow: 0 0 20px rgba(247, 244, 234, 0.3);
  transform: translateY(-2px);
}

.rs-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  background: #2C3D85;
  transition: background 0.3s ease;
}

.rs-section-header:hover {
  background: rgba(247, 244, 234, 0.15);
}

.rs-section-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rs-section-title i {
  width: 28px;
  height: 28px;
  color: #F7F4EA;
  stroke-width: 2.5;
}

.rs-section-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #F7F4EA;
}

.rs-toggle-btn {
  background: transparent;
  border: 2px solid #F7F4EA;
  border-radius: 8px;
  color: #F7F4EA;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.rs-toggle-btn i {
  width: 32px;
  height: 32px;
  stroke-width: 3;
}

.rs-toggle-btn:hover {
  transform: scale(1.15);
  background: rgba(247, 244, 234, 0.1);
}

/* Section 预览区 */
.rs-section-preview {
  padding: 12px 24px 16px 24px;
  background: var(--rs-bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rs-preview-item {
  border-bottom: 1px solid var(--rs-divider);
  padding-bottom: 12px;
}

.rs-preview-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 当section展开时，隐藏preview */
.rs-collapsible-section:not(.rs-always-expanded) .rs-section-content:not(.collapsed) ~ .rs-section-preview {
  display: none !important;
}

/* 工作经历和项目经历展开时隐藏缩略图 */
#section-experience .rs-section-content:not(.collapsed) ~ .rs-section-preview,
#section-projects .rs-section-content:not(.collapsed) ~ .rs-section-preview {
  display: none !important;
}

.rs-preview-text {
  color: var(--rs-text-secondary);
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.5;
}

.rs-preview-media {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rs-preview-media img,
.rs-preview-media video {
  height: 120px;
  width: auto;
  object-fit: cover;
  border-radius: 8px;
  border: none;
}

/* Section 完整内容区 */
.rs-section-content {
  max-height: 5000px;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease,
              padding 0.3s ease;
  opacity: 1;
  padding: 16px 24px 20px 24px;
}

.rs-section-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 24px;
}

/* 内容块样式 */
.rs-content-block {
  margin-bottom: 16px;
}

.rs-content-block h3 {
  color: #F7F4EA;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.rs-text {
  color: var(--rs-text-secondary);
  line-height: 1.6;
  margin: 0;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 8px;
}

/* 预览页：深底上使用浅字、浅底 */
.rs-preview-layout .rs-section-content .rs-text {
  color: #f7f4ea;
  background: rgba(255, 255, 255, 0.06);
}

/* 关于我模块不再需要左右布局 */

/* 媒体网格 */
.rs-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.rs-media-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rs-border);
  transition: all 0.3s ease;
  cursor: pointer;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs-media-item:hover {
  border-color: #F7F4EA;
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(247, 244, 234, 0.4);
}

.rs-media-item img,
.rs-media-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rs-media-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.9);
  color: var(--rs-text-primary);
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
}

/* 技能标签 */
.rs-skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.rs-skill-tag {
  padding: 10px 20px;
  background: rgba(247, 244, 234, 0.15);
  color: #F7F4EA;
  border: 1px solid #F7F4EA;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.rs-skill-tag:hover {
  background: #F7F4EA;
  color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(247, 244, 234, 0.4);
}

/* 项目/经历/教育条目 */
.rs-exp-item,
.rs-proj-item,
.rs-edu-item,
.rs-award-item,
.rs-portfolio-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--rs-divider);
}

.rs-exp-item:last-child,
.rs-proj-item:last-child,
.rs-edu-item:last-child,
.rs-award-item:last-child,
.rs-portfolio-item:last-child {
  border-bottom: none;
}

.rs-exp-header,
.rs-proj-header,
.rs-edu-header,
.rs-award-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rs-exp-item h3,
.rs-proj-item h3,
.rs-edu-item h3,
.rs-award-item h3,
.rs-portfolio-item h3 {
  color: var(--rs-text-primary);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.rs-meta {
  color: var(--rs-text-secondary);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.rs-date {
  color: var(--rs-text-muted);
  font-size: 14px;
  white-space: nowrap;
}

.rs-year-title {
  color: #F7F4EA;
  font-size: 15px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  padding-left: 10px;
  border-left: 3px solid #F7F4EA;
}

.rs-skill-group {
  margin-bottom: 24px;
}

.rs-skill-group h4 {
  color: var(--rs-text-primary);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

/* 列表和bullets */
.rs-bullets {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.rs-bullets li {
  color: #1e293b;
  padding: 10px 16px 10px 24px;
  margin-bottom: 8px;
  position: relative;
  line-height: 1.6;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 8px;
}

.rs-bullets li:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  width: 5px;
  height: 5px;
  background: #F7F4EA;
  border-radius: 50%;
}

/* 预览页 bullets 在深底上改为浅色方案 */
.rs-preview-layout .rs-section-content .rs-bullets li {
  color: #f7f4ea;
  background: rgba(255, 255, 255, 0.06);
}

.rs-preview-layout .rs-section-content .rs-bullets li:before {
  background: #f7f4ea;
}

/* Lightbox */
.rs-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rs-lightbox.active {
  display: flex;
  opacity: 1;
}

.rs-lightbox-content {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.rs-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: var(--rs-shadow-lg);
}

#rsLightboxCaption {
  color: var(--rs-text-primary);
  margin-top: 16px;
  font-size: 14px;
}

.rs-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.rs-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.rs-lightbox-close i {
  width: 24px;
  height: 24px;
}

/* 视频容器 */
.rs-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.rs-video-wrapper video,
.rs-video916-media {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--rs-border);
}

/* Tags */
.rs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rs-tag {
  padding: 4px 12px;
  background: rgba(247, 244, 234, 0.15);
  color: #F7F4EA;
  border: 1px solid #F7F4EA;
  border-radius: 6px;
  font-size: 12px;
}

/* ============================================
   始终展开的紧凑模块 (技能、教育)
   ============================================ */

.rs-always-expanded {
  background: var(--rs-bg-secondary);
}

.rs-section-header-simple {
  padding: 20px 32px 16px 32px;
  background: #2C3D85;
  border-bottom: 1px solid var(--rs-divider);
}

.rs-compact-content {
  padding: 20px 32px;
  max-height: none !important;
  opacity: 1 !important;
}

/* 技能模块紧凑样式 */
.rs-skill-group-compact {
  margin-bottom: 16px;
}

.rs-group-title {
  color: #F7F4EA;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.rs-skill-items-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-skill-tag-compact {
  padding: 6px 14px;
  background: rgba(247, 244, 234, 0.12);
  color: #F7F4EA;
  border: 1px solid rgba(247, 244, 234, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s ease;
}

.rs-skill-tag-compact:hover {
  background: rgba(247, 244, 234, 0.2);
  border-color: #F7F4EA;
}

/* 教育模块紧凑样式 */
.rs-edu-item-compact {
  padding: 16px 0;
  border-bottom: 1px solid var(--rs-divider);
}

.rs-edu-item-compact:last-of-type {
  border-bottom: none;
}

.rs-edu-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.rs-edu-school {
  color: #F7F4EA;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.rs-edu-degree {
  color: var(--rs-text-secondary);
  font-size: 13px;
  margin: 0;
}

.rs-edu-period {
  color: var(--rs-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.rs-edu-details {
  color: var(--rs-text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0 0;
}

/* 奖项紧凑样式 */
.rs-awards-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rs-divider);
}

.rs-awards-title {
  color: #F7F4EA;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px 0;
  letter-spacing: 0.5px;
}

.rs-award-item-compact {
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.05);
}

.rs-award-item-compact:last-child {
  border-bottom: none;
}

.rs-award-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.rs-award-title {
  color: #F7F4EA;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.rs-award-org {
  color: var(--rs-text-secondary);
  font-size: 12px;
  margin: 0;
}

.rs-award-date {
  color: var(--rs-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.rs-award-desc {
  color: var(--rs-text-secondary);
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 0 0;
}

/* buttons */
.rs-btn{
  appearance:none;
  border:none;
  background:white;
  border-radius:12px;
  padding:12px 24px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  text-decoration:none;
  color:#1e293b;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:all 0.3s ease;
  box-shadow:var(--rs-shadow-sm);
}
.rs-btn:hover{
  box-shadow:var(--rs-shadow-md);
  transform:translateY(-2px);
}
.rs-btn--ghost{
  background:transparent;
  box-shadow:none;
  color:#1e293b;
}
.rs-btn--ghost:hover{
  background:var(--rs-bg-light);
}
.rs-btn--primary,
.rs-btn-primary{
  background:var(--rs-gradient-blue);
  border-color:transparent;
  color:white;
  box-shadow:var(--rs-shadow-md);
}
.rs-btn--primary:hover,
.rs-btn-primary:hover{
  box-shadow:var(--rs-shadow-lg);
  transform:translateY(-2px);
}
.rs-btn--danger{
  background:var(--rs-danger);
  border-color:transparent;
  color:white;
}
.rs-btn-upload{
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 8px 16px;
  font-size: 13px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rs-btn-upload:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.rs-btn-upload:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* AI 分析按钮样式 */
.rs-btn-ai {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.rs-btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.rs-btn-ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 小型 AI 按钮（图片行内） */
.rs-btn-ai-small {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(245, 87, 108, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.rs-btn-ai-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

.rs-btn-ai-small:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rs-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border:1px solid var(--rs-line);
  border-radius:999px;background:rgba(255,255,255,.7);
  color:#64748b;
  font-size:12px;
}

/* headings */
.rs-h2{
  margin:0 0 10px 0;
  font-size:18px;
  letter-spacing:.2px;
}

/* topbar */
.rs-topbar{
  position:sticky;top:0;z-index:100;
  display:flex;justify-content:space-between;align-items:center;
  padding:20px 32px;
  background:rgba(255,255,255,.95);
  border-bottom:2px solid var(--rs-line);
  backdrop-filter: blur(10px);
  box-shadow:var(--rs-shadow-sm);
}
.rs-topbar-left .rs-brand-title,
.rs-topbar-left .rs-brand-sub {
  color:#1e293b;
}
.rs-brand{display:flex;align-items:center;gap:14px}
.rs-logo{
  width:44px;height:44px;border-radius:14px;
  background:var(--rs-gradient-blue);
  color:#fff;font-weight:900;
  display:flex;align-items:center;justify-content:center;
  font-size:18px;
  box-shadow:var(--rs-shadow-md);
}
.rs-brand-title{font-weight:900;line-height:1;font-size:18px;color:#1e293b}
.rs-brand-sub{font-size:13px;color:#64748b;margin-top:4px}
.rs-topbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rs-status{font-size:12px;color:#64748b;margin-right:4px;display:inline-flex;align-items:center}
.rs-status-dot{width:8px;height:8px;border-radius:50%;background:var(--rs-accent2);display:inline-block;margin-right:6px}
.rs-status--dirty .rs-status-dot{background:#ff9f1a}

/* editor layout */
.rs-wrap{max-width:1400px;margin:0 auto;padding:32px 24px;background:var(--rs-bg-light);min-height:100vh}
.rs-nav{
  display:flex;flex-wrap:wrap;gap:8px;
  padding:10px;
  background:rgba(255,255,255,.6);
  border:1px solid var(--rs-line);
  border-radius:var(--rs-radius);
}
.rs-nav a{
  padding:8px 10px;
  border-radius:999px;
  text-decoration:none;
  color:#64748b;
  border:1px solid transparent;
  font-weight:750;
  font-size:13px;
}
.rs-nav a:hover{background:rgba(99,91,255,.08);color:var(--rs-text)}
.rs-nav a.is-active{
  background:rgba(99,91,255,.12);
  border-color:rgba(99,91,255,.25);
  color:var(--rs-text);
}

.rs-grid-editor{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  margin-top:14px;
}

.rs-card{
  background:var(--rs-card);
  border:none;
  border-radius:var(--rs-radius-lg);
  box-shadow:var(--rs-shadow-md);
  overflow:hidden;
  transition: all 0.3s ease;
  margin-bottom:24px;
}
.rs-card:hover{
  box-shadow:var(--rs-shadow-lg);
  transform:translateY(-2px);
}
.rs-card-hd{
  padding:20px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border-bottom:2px solid var(--rs-line);
  background:linear-gradient(180deg, #2C3D85, rgba(99,91,255,.15));
}
.rs-card-hd-left{display:flex;flex-direction:column;gap:2px}
.rs-card-title{font-weight:950;color:#F7F4EA}
.rs-card-sub{font-size:12px;color:#cbd5e1}
.rs-card-bd{padding:14px 16px}

.rs-row{display:grid;grid-template-columns: 1fr 1fr;gap:10px}
.rs-row-1{display:grid;grid-template-columns: 1fr;gap:10px}
@media (max-width: 880px){
  .rs-row{grid-template-columns:1fr}
}

.rs-field label{display:block;font-size:12px;color:#0f172a!important;margin-bottom:6px;font-weight:700}
.rs-field input,.rs-field textarea, .rs-field select{
  width:100%;
  border:1px solid var(--rs-line);
  background:var(--rs-accent-cream);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  outline:none;
  color:#1e293b;
}
.rs-field select option {
  background:var(--rs-accent-cream);
  color:#1e293b;
}
.rs-field textarea{min-height:92px;resize:vertical;line-height:1.5;color:#1e293b}
.rs-field input:focus,.rs-field textarea:focus,.rs-field select:focus{
  border-color:rgba(99,91,255,.45);
  box-shadow:0 0 0 4px rgba(99,91,255,.12);
}

.rs-help{
  font-size:12px;color:#1e293b;
  background:rgba(2,6,23,.03);
  border:1px dashed rgba(2,6,23,.15);
  border-radius:14px;
  padding:10px 12px;
  line-height:1.6;
}

.rs-list{display:flex;flex-direction:column;gap:12px}
.rs-item-box{
  border:1px solid var(--rs-line);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.9);
}
.rs-item-box-hd{
  display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px;
}
.rs-item-box-hd strong{display:block;font-size:14px;color:#1e293b}
.rs-mini{font-size:12px;color:#64748b;line-height:1.4}
.rs-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.rs-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 10px 0}
.rs-tab{
  padding:6px 10px;border-radius:999px;border:1px solid var(--rs-line);
  background:#fff;cursor:pointer;font-weight:800;font-size:12px;color:#1e293b;
}
.rs-tab.is-active{background:#2C3D85;border-color:#2C3D85;color:#F7F4EA}

.rs-bullets-edit{display:flex;flex-direction:column;gap:8px}
.rs-bullet-row{display:flex;gap:8px;align-items:flex-start}
.rs-bullet-row textarea{min-height:52px;color:#1e293b;background:var(--rs-accent-cream)}
.rs-bullet-row .rs-btn{padding:9px 10px}

.rs-media-edit{display:flex;flex-direction:column;gap:8px}
.rs-media-row{display:grid;grid-template-columns: 110px 1fr 1fr auto;gap:8px;align-items:center}
@media (max-width: 880px){
  .rs-media-row{grid-template-columns: 1fr}
}
.rs-media-row input, .rs-media-row select{width:100%;background:var(--rs-accent-cream);color:#1e293b}
.rs-media-row select option{background:var(--rs-accent-cream);color:#1e293b}
.rs-media-row .rs-btn{white-space:nowrap}

/* preview */
.rs-preview-body{background:#fff}
.rs-topbar--preview{background:rgba(255,255,255,.92)}
.rs-preview{max-width:1100px;margin:20px auto 70px auto;padding:0 16px}

/* preview/export layout */
.rs-page{
  background:var(--rs-bg-light);
  min-height:100vh;
  padding:0;
}
.rs-layout{
  max-width:1400px;
  margin:0 auto;
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:24px;
  align-items:start;
  padding:32px 24px;
}
/* ============================================
   动画效果
   ============================================ */

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

.rs-collapsible-section {
  animation: fadeInUp 0.6s ease backwards;
}

.rs-collapsible-section:nth-child(1) { animation-delay: 0.1s; }
.rs-collapsible-section:nth-child(2) { animation-delay: 0.2s; }
.rs-collapsible-section:nth-child(3) { animation-delay: 0.3s; }
.rs-collapsible-section:nth-child(4) { animation-delay: 0.4s; }
.rs-collapsible-section:nth-child(5) { animation-delay: 0.5s; }
.rs-collapsible-section:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   响应式适配
   ============================================ */

@media (max-width: 1024px) {
  .rs-main-content {
    padding: 32px 40px;
  }
  
  .rs-media-grid,
  .rs-preview-media {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .rs-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--rs-border);
  }
  
  .rs-main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 24px 16px;
  }
  
  .rs-section-header {
    padding: 20px 16px;
  }
  
  .rs-section-content {
    padding: 16px;
  }
  
  .rs-section-content.collapsed {
    padding: 0 16px;
  }
  
  .rs-section-title h2 {
    font-size: 20px;
  }
  
  .rs-media-grid,
  .rs-preview-media {
    grid-template-columns: 1fr;
  }
  
  .rs-preview-media img,
  .rs-preview-media video {
    height: 160px;
  }
  
  .rs-exp-header,
  .rs-proj-header,
  .rs-edu-header,
  .rs-award-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .rs-date {
    align-self: flex-start;
  }
  
  .rs-layout{grid-template-columns:1fr; padding:24px 16px;}
  
  .rs-nav-modern {
    padding: 12px 16px;
  }
  
  .rs-card {
    padding: 20px 16px;
  }
}
.rs-col{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.rs-page .rs-card > :not(.rs-card-hd){
  padding:0 16px 16px;
}

.rs-hero{
  display:grid;
  grid-template-columns: 1fr;
  gap:24px;
  background:var(--rs-gradient-blue);
  border:none;
  border-radius:var(--rs-radius-xl);
  padding:48px 32px;
  color:white;
  box-shadow:var(--rs-shadow-lg);
  margin-bottom:24px;
}
@media (max-width: 720px){
  .rs-hero{grid-template-columns:1fr}
}
.rs-hero-main{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}
.rs-hero-avatar{
  width:96px;
  height:96px;
  border-radius:24px;
  overflow:hidden;
  border:1px solid var(--rs-line);
  background:#fff;
}
.rs-hero-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.rs-hero-avatar-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  font-weight:950;
  color:var(--rs-accent);
  background:rgba(99,91,255,.08);
}
.rs-hero-text{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:200px;
}
.rs-hero-name{font-size:36px;font-weight:950;letter-spacing:.2px;color:white}
.rs-hero-title{font-size:18px;color:rgba(255,255,255,0.9);font-weight:600;margin-top:8px}
.rs-hero-contact{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-top:12px;
  font-size:12px;
  color:#64748b;
  font-weight:750;
}
.rs-hero-contact span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:rgba(255,255,255,0.95);
  font-size:14px;
  padding:4px 8px;
  border:1px solid var(--rs-line);
  border-radius:10px;
  background:rgba(255,255,255,.85);
}
.rs-avatar{width:120px;height:120px;border-radius:24px;overflow:hidden;border:1px solid var(--rs-line);background:#fff}
.rs-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.rs-avatar-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:44px;font-weight:950;color:var(--rs-accent)}
.rs-name{font-size:28px;font-weight:950;letter-spacing:.2px}
.rs-headline{font-size:14px;color:#64748b;margin-top:6px;font-weight:750}
.rs-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.rs-summary{margin-top:12px;color:#1e293b;line-height:1.7}
.rs-prose{line-height:1.7;color:#1e293b}
.rs-links{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
.rs-link{
  padding:6px 10px;border:1px solid var(--rs-line);border-radius:999px;
  text-decoration:none;color:var(--rs-text);font-weight:800;font-size:12px;
  background:#fff;
}
.rs-link:hover{box-shadow:0 8px 20px rgba(2,6,23,.08)}

.rs-grid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  margin-top:16px;
}
@media (max-width: 980px){
  .rs-grid{grid-template-columns:1fr}
}
.rs-section{
  background:#fff;
  border:1px solid var(--rs-line);
  border-radius:24px;
  padding:16px;
  box-shadow:0 10px 24px rgba(2,6,23,.05);
  margin-bottom:16px;
}
.rs-item{padding:10px 0;border-top:1px dashed rgba(15,23,42,.12)}
.rs-item:first-child{border-top:0;padding-top:0}
.rs-item-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.rs-item-title{font-weight:950}
.rs-item-date{font-size:12px;color:#64748b;white-space:nowrap}
.rs-item-sub{font-size:12px;color:#64748b;margin-top:2px;font-weight:750}
.rs-item-text{margin-top:6px;color:#1e293b;line-height:1.7}
.rs-bullets{margin:10px 0 0 18px;color:#1e293b;line-height:1.7}
.rs-years{margin-top:10px}
.rs-year{border:1px solid var(--rs-line);border-radius:18px;padding:10px 12px;background:rgba(2,6,23,.02);margin-top:10px}
.rs-year-sum{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px}
.rs-year-badge{font-weight:950}
.rs-year-hint{font-size:12px;color:#64748b}
.rs-cards{display:grid;grid-template-columns: 1fr 1fr;gap:12px;margin-top:10px}
@media (max-width: 900px){
  .rs-cards{grid-template-columns:1fr}
}
.rs-pcard{border:1px solid var(--rs-line);border-radius:20px;padding:12px;background:rgba(2,6,23,.02)}
.rs-pcard-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.rs-pcard-title{font-weight:950}
.rs-pcard-sub{font-size:12px;color:#64748b;font-weight:750}
.rs-pcard-date{font-size:12px;color:#64748b;margin-top:6px}
.rs-pcard-desc{margin-top:6px;color:#1e293b;line-height:1.7}
.rs-pcard-links{margin-top:8px}
.rs-skill-group{padding:10px 0;border-top:1px dashed rgba(15,23,42,.12)}
.rs-skill-group:first-child{border-top:0;padding-top:0}
.rs-skill-title{font-size:12px;color:#64748b;font-weight:900}
.rs-skill-items{margin-top:6px;font-weight:850;line-height:1.6}
.rs-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.rs-tag{
  padding:6px 10px;
  border:1px solid var(--rs-line);
  border-radius:999px;
  background:#fff;
  font-size:12px;
  font-weight:800;
  color:#64748b;
}
.rs-hero-side-sub{color:#64748b;font-weight:750;margin-bottom:4px}
.rs-item-meta{font-size:12px;color:#64748b;font-weight:750;margin-top:2px}
.rs-item-desc{margin-top:6px;color:#1e293b;line-height:1.6}
.rs-item-subhd{font-size:13px;font-weight:850;color:#1e293b;margin:12px 0 6px 0;padding-left:0;border-left:3px solid rgba(99,91,255,.5);padding-left:8px}
.rs-row-left{display:flex;flex-direction:column;gap:4px}
.rs-row-right{text-align:right;font-size:12px;color:#64748b;white-space:nowrap}
.rs-quote{padding:12px;border:1px solid var(--rs-line);border-radius:18px;background:rgba(99,91,255,.06);margin-top:10px}
.rs-quotes{display:flex;flex-direction:column;gap:10px}
.rs-quote-text{line-height:1.7}
.rs-quote-from,.rs-quote-by{margin-top:8px;font-size:12px;color:#64748b;font-weight:850}

/* media */
.rs-media{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
  margin-top:10px;
}
.rs-media-thumb{
  border:1px solid var(--rs-line);
  border-radius:14px;
  background:#fff;
  padding:8px;
  cursor:pointer;
  text-align:left;
  width:100%;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.rs-media-thumb img{width:100%;height:90px;object-fit:cover;border-radius:10px;display:block}
.rs-media-thumb span{display:block;margin-top:6px;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-media-thumb:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(15,23,42,.12);
  border-color:rgba(99,91,255,.35);
}
.rs-media-cap{display:block;margin-top:6px;font-size:12px;color:#64748b}
.rs-media-link{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 10px;border:1px solid var(--rs-line);border-radius:999px;
  text-decoration:none;color:var(--rs-text);background:#fff;font-weight:800;font-size:12px;
}
.rs-media-video{
  border:1px solid var(--rs-line);
  border-radius:14px;
  background:#fff;
  padding:8px;
  width:100%;
}
.rs-media-video video{
  display:block;width:100%;height:auto;border-radius:12px;
}
.rs-media-video .rs-media-cap{
  font-size:12px;color:var(--rs-sub);line-height:1.4;padding:4px 4px 0 4px;
}

/* fallback for大图：媒体区内的 img 统一收敛尺寸 */
.rs-media img{
  max-height:240px;
  width:100%;
  object-fit:cover;
  border-radius:12px;
  display:block;
}

/* 全局图片兜底：避免未包裹在 rs-media 时撑开 */
.rs-page img{
  max-width:100%;
  height:auto;
}

/* modal */
.rs-modal{position:fixed;inset:0;display:none;z-index:50}
.rs-modal.is-open{display:block}
.rs-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.55)}
.rs-modal-dialog{
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:min(920px,92vw);
  background:#fff;border:1px solid var(--rs-line);
  border-radius:22px;box-shadow:var(--rs-shadow);
  padding:16px;
}
.rs-modal-close{position:absolute;right:14px;top:14px;border:1px solid var(--rs-line);background:#fff;border-radius:999px;width:38px;height:38px;cursor:pointer;font-weight:900}
.rs-modal-title{font-weight:950;margin:6px 0 12px 0}
.rs-modal-img{width:100%;max-height:70vh;object-fit:contain;background:#fff;border-radius:16px;border:1px solid var(--rs-line)}
.rs-modal-actions{margin-top:12px;display:flex;gap:10px;justify-content:flex-end}



/* --- v7 layout tweaks (hero skills + intro video) --- */
.rs-hero-side{
  align-self:stretch;
  padding-top:6px;
}
.rs-hero-side-title{
  font-weight:700;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--rs-muted);
  margin:2px 0 10px;
}
.rs-skill-groups--compact{
  display:grid;
  gap:10px;
}
.rs-skill-group--compact .rs-skill-title{
  font-size:12px;
  color:var(--rs-text);
  margin-bottom:6px;
}
.rs-skill-group--compact .rs-chip{
  font-size:11px;
}

@media (min-width: 980px){
  .rs-hero{
    grid-template-columns: 120px 1fr 320px;
  }
  .rs-hero-side{
    border-left:1px solid var(--rs-line);
    padding-left:16px;
    padding-top:0;
  }
}
@media (max-width: 979px){
  .rs-hero-side{
    grid-column: 1 / -1;
    border-top:1px solid var(--rs-line);
    padding-top:14px;
    margin-top:8px;
  }
}

/* 9:16 video */
.rs-video916{
  width:100%;
  max-width:320px;
  aspect-ratio:9/16;
  border-radius:16px;
  overflow:hidden;
  background:#000;
  margin:0 auto;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}
.rs-video916-media{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  background:#000;
}
.rs-video916-hint{
  margin-top:8px;
  font-size:12px;
  color:#64748b;
  text-align:center;
}

/* editor preview for intro video */
.rs-intro-preview{
  margin-top:10px;
}
.rs-intro-preview video{
  width: 220px;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  border-radius:16px;
  border:1px solid var(--rs-line);
  background:#000;
  object-fit:cover;
  display:block;
}

/* 预览页右上角工具条（导出 HTML 不包含） */
.rs-toolbar{
  position:fixed;
  top:14px;
  right:14px;
  z-index:999;
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px;
  border:1px solid var(--rs-line);
  border-radius:999px;
  background:rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:0 12px 28px rgba(15,23,42,.12);
  opacity:.25;
  transition:opacity .15s ease;
}
.rs-toolbar:hover{opacity:1;}

/* 打印 / 导出时隐藏 */
.rs-print-hide{display:block;}
@media print{.rs-print-hide{display:none !important;}}

/* ========== AI 助手样式 ========== */

/* AI 按钮 */
.rs-ai-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rs-ai-btn:hover {
  background: #f5f5f5;
  border-color: #6366f1;
  transform: scale(1.05);
}

.rs-ai-btn:active {
  transform: scale(0.98);
}

.rs-ai-btn.is-loading {
  animation: rs-ai-pulse 1.5s ease-in-out infinite;
}

/* Textarea 配 AI 按钮容器 */
.rs-textarea-with-ai {
  position: relative;
}

.rs-textarea-with-ai textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 50px 10px 10px;  /* 右侧留出空间给 AI 按钮 */
  color: #1e293b;
  background: var(--rs-accent-cream);
}

.rs-textarea-with-ai .rs-ai-btn {
  position: absolute;
  right: 10px;
  top: 10px;
}

@keyframes rs-ai-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* AI 菜单 */
.rs-ai-menu {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 8px;
  z-index: 1000;
  min-width: 240px;
  max-width: 300px;
  animation: rs-ai-menu-in 0.15s ease-out;
}

@keyframes rs-ai-menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rs-ai-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
}

.rs-ai-menu-item:hover {
  background: #f5f5f7;
}

.rs-ai-menu-item-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.rs-ai-menu-item-content {
  flex: 1;
  min-width: 0;
}

.rs-ai-menu-item-label {
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.rs-ai-menu-item-desc {
  font-size: 12px;
  color: #666;
}

/* AI 结果预览 */
.rs-ai-preview {
  background: #f8f9fa;
  border: 2px dashed #6366f1;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  animation: rs-ai-preview-in 0.2s ease-out;
}

@keyframes rs-ai-preview-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rs-ai-preview-label {
  font-size: 12px;
  color: #6366f1;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rs-ai-preview-content {
  background: white;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
}

.rs-ai-preview-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.rs-ai-preview-actions .rs-btn {
  font-size: 13px;
  padding: 6px 12px;
}

/* Bullet row with AI button */
.rs-bullet-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.rs-bullet-row textarea {
  flex: 1;
  min-width: 0;
}

/* ========== 上下文面板样式 ========== */

/* 上下文面板容器 */
.rs-ai-context-panel {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  font-size: 13px;
  border: 1px solid #e8e8e8;
}

/* Modern Navigation for Editor */
.rs-nav-modern {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--rs-radius-lg);
  box-shadow: var(--rs-shadow-md);
  margin-bottom: 32px;
  overflow-x: auto;
  position: sticky;
  top: 20px;
  z-index: 100;
}

.rs-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--rs-radius);
  text-decoration: none;
  color: #64748b;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: transparent;
}

.rs-nav-item:hover {
  background: var(--rs-bg-light);
  color: #2563eb;
  transform: translateY(-2px);
}

.rs-nav-item.active {
  background: var(--rs-gradient-blue);
  color: white;
  box-shadow: var(--rs-shadow-md);
}

.rs-nav-icon {
  font-size: 20px;
}

.rs-nav-label {
  font-size: 14px;
}

/* Editor Container */
.rs-editor-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  background: var(--rs-bg-light);
  min-height: 100vh;
}

/* Global Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation Utilities */
.fade-in {
  animation: fadeIn 0.4s ease;
}

.slide-up {
  animation: slideUp 0.4s ease;
}

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

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

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--rs-accent-cream);
  color: #0f172a;
  width: 100%;
  font-family: var(--rs-font);
}

input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #475569 !important;
  opacity: 1;
}

/* 提高浅底输入区文字对比度（Editor） */
.rs-field input,
.rs-field textarea,
.rs-field select {
  color: #0f172a !important;
  background: var(--rs-accent-cream);
}

/* 帮助/提示文字在浅底也保持深色可读 */
.rs-help,
.rs-mini,
.rs-status,
.rs-status .rs-status-text {
  color: #1e293b !important;
}

select option {
  background: var(--rs-accent-cream);
  color: #1e293b;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--rs-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Field Labels */
label {
  display: block;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
  font-size: 14px;
}

/* AI Context Styles */
.rs-ai-context-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}

.rs-ai-context-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.rs-ai-context-title {
  flex: 1;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

.rs-ai-context-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  color: #666;
  transition: color 0.2s;
  flex-shrink: 0;
}

.rs-ai-context-toggle:hover {
  color: #6366f1;
}

.expand-icon {
  font-size: 12px;
  display: inline-block;
  transition: transform 0.2s;
}

/* 边界说明 */
.rs-ai-context-boundary {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
}

.rs-ai-context-boundary .boundary-icon {
  font-size: 14px;
  margin-right: 4px;
}

.rs-ai-context-boundary strong {
  font-weight: 600;
}

/* 上下文摘要列表 */
.rs-ai-context-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.rs-ai-context-item {
  color: #444;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.rs-ai-context-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 4px;
  height: 4px;
  background: #6366f1;
  border-radius: 50%;
}

/* 提示文本 */
.rs-ai-context-hint {
  color: #666;
  font-size: 12px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border-left: 3px solid #6366f1;
}

/* 详细上下文区域 */
.rs-ai-context-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  animation: rs-context-expand 0.2s ease-out;
}

@keyframes rs-context-expand {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.rs-ai-context-section {
  margin-bottom: 14px;
}

.rs-ai-context-section:last-child {
  margin-bottom: 0;
}

.rs-ai-context-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8e8e8;
}

.rs-ai-context-section-header strong {
  font-size: 13px;
  color: #1a1a1a;
}

/* 相关性指示器 */
.rs-ai-relevance {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.rs-ai-relevance--high {
  background: #dcfce7;
  color: #166534;
}

.rs-ai-relevance--medium {
  background: #fef3c7;
  color: #92400e;
}

.rs-ai-relevance--low {
  background: #f3f4f6;
  color: #6b7280;
}

/* 上下文内容 */
.rs-ai-context-section-content {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}

.rs-ai-context-section-content > div {
  margin-bottom: 4px;
}

.rs-ai-context-exp {
  margin-bottom: 8px;
}

/* AI 操作区域分隔 */
.rs-ai-actions {
  padding-top: 8px;
  border-top: 1px solid #e8e8e8;
}
