/* 基础样式 */
:root {
    /* 浅色模式变量 - 使用明亮的紫色系 */
    --primary-color: #6366F1;
    --secondary-color: #818CF8;
    --accent-color: #4F46E5;
    --text-color: #1F2937;
    --light-gray: #F9FAFB;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --sidebar-width: 280px;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --header-gradient-start: #6366F1;
    --header-gradient-end: #4F46E5;
    --note-bg: #EEF2FF;
    --step-bg: #F9FAFB;
    --shadow-color: rgba(99, 102, 241, 0.1);
}

/* 深色模式变量 */
[data-theme="dark"] {
    --primary-color: #A5B4FC;
    --secondary-color: #818CF8;
    --accent-color: #6366F1;
    --text-color: #F9FAFB;
    --light-gray: #1F2937;
    --border-color: #374151;
    --bg-color: #111827;
    --card-bg: #1F2937;
    --header-gradient-start: #4F46E5;
    --header-gradient-end: #3730A3;
    --note-bg: #312E81;
    --step-bg: #1F2937;
    --shadow-color: rgba(99, 102, 241, 0.2);
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 语言切换按钮 */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 160px;
    min-width: 80px;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* 更新现有样式以使用新的变量 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

.sidebar {
    background: var(--card-bg);
    box-shadow: 2px 0 5px var(--shadow-color);
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.header {
    background: linear-gradient(135deg, var(--header-gradient-start), var(--header-gradient-end));
    text-align: center;
    padding: 40px 0;
    color: white;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section {
    background: var(--card-bg);
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: 40px;
    padding: 30px;
    border-radius: 8px;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

.step-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin: 0;
}

.step-list li {
    position: relative;
    padding: 15px 15px 15px 50px;
    margin-bottom: 15px;
    background: var(--step-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-height: 54px;
}

.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* 步骤内容布局 */
.step-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.step-text {
    width: 100%;
}

.step-text ul {
    list-style-type: none;
    padding-left: 20px;
}

.step-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.step-text li::before {
    content: "•";
    color: var(--secondary-color);
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -2px;
}

/* 图片容器样式 */
.image-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    text-align: center;
}

.image-container img {
    max-width: 100%;
    width: 800px;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.image-caption {
    margin-top: 10px;
    color: var(--text-color);
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.8;
}

/* 章节切换动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-transition {
    animation: fadeInUp 0.5s ease forwards;
}

/* 侧边栏样式 */
.sidebar-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.2em;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    position: relative;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    display: block;
}

.nav-menu a:hover {
    background: var(--note-bg);
    color: var(--accent-color);
}

.nav-menu a.active {
    background: var(--accent-color);
    color: white;
    font-weight: 500;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* 主内容区域样式 */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* 标题样式 */
.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

/* 章节样式 */
.section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.section h3 {
    color: var(--secondary-color);
    margin: 25px 0 15px;
    font-size: 1.4em;
}

/* 提示框样式 */
.note strong {
    color: var(--accent-color);
}

/* 快速导航按钮 */
.quick-nav {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: none;
}

.quick-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--accent-color);
        color: white;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .header {
        padding: 20px 0;
    }

    .header h1 {
        font-size: 2em;
    }

    .section {
        padding: 20px;
    }

    .step-content {
        gap: 15px;
    }

    .image-container {
        padding: 10px;
    }

    .image-container img {
        width: 100%;
    }

    .step-list li {
        padding: 12px 12px 12px 45px;
        min-height: 48px;
    }

    .step-list li::before {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 12px;
        left: 12px;
    }
}

/* 打印样式 */
@media print {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        background: none;
        color: black;
    }

    .section {
        box-shadow: none;
        break-inside: avoid;
    }

    .image-container {
        break-inside: avoid;
    }

    .quick-nav {
        display: none;
    }
}

/* 使用步骤链接样式 */
.usage-intro {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.usage-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.usage-link:hover {
    background-color: var(--primary-color-dark);
}

/* 返回主文档按钮样式 */
.back-to-main {
    position: fixed;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-main:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 暗色主题适配 */
[data-theme="dark"] .usage-intro {
    background-color: var(--bg-secondary-dark);
}

[data-theme="dark"] .back-to-main {
    background-color: var(--bg-secondary-dark);
    color: var(--text-primary-dark);
}

[data-theme="dark"] .back-to-main:hover {
    background-color: var(--primary-color-dark);
}

/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* 语言切换按钮 */
.language-switch {
    margin-top: 20px;
}

.language-switch button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.language-switch button:hover {
    background-color: var(--hover-color);
}

/* 使用步骤样式 */
.usage-steps {
    margin-bottom: 40px;
}

.usage-steps h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.step-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.step-section h3 {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.step-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.step-text {
    flex: 1;
}

.step-text ul {
    list-style-type: none;
    padding-left: 20px;
}

.step-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.step-text li::before {
    content: "•";
    color: var(--secondary-color);
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -2px;
}

.step-image {
    flex: 1;
    text-align: center;
}

.step-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.image-caption {
    margin-top: 10px;
    color: var(--secondary-color);
    font-style: italic;
    font-size: 0.9em;
}

/* 导航链接 */
.navigation {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-link:hover {
    background-color: var(--hover-color);
}

/* 动画效果 */
.step-section {
    transition: transform 0.3s ease;
}

.step-section:hover {
    transform: translateY(-5px);
}

/* 打印样式 */
@media print {
    .language-switch,
    .navigation {
        display: none;
    }

    .step-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .step-image img {
        max-width: 80%;
    }
}

#langToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}
#themeToggle {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 1000;
}
#websiteBtn {
  position: fixed;
  top: 120px;
  right: 20px;
  z-index: 1000;
  text-align: center;
  text-decoration: none;
  display: block;
}
#langToggle, #themeToggle, #websiteBtn {
  width: 120px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-weight: 500;
  font-size: 1em;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
  cursor: pointer;
}
#langToggle:hover, #themeToggle:hover, #websiteBtn:hover {
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.top-btn {
  position: fixed;
  right: 20px;
  width: 96px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 7px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
  cursor: pointer;
  text-align: center;
  z-index: 1000;
  text-decoration: none;
  display: block;
  letter-spacing: 0.5px;
}
#langToggle.top-btn { top: 20px; }
#themeToggle.top-btn { top: 80px; }
#websiteBtn.top-btn { top: 140px; }
.top-btn:hover {
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* 清理无用的旧按钮样式（如 side-toolbar、website-link、toolbar-link、toolbar-button、top-toolbar） */
.side-toolbar, .website-link, .toolbar-link, .toolbar-button, .top-toolbar {
  display: none !important;
}

/* 增强 header 区域标题和副标题的可读性 */
.header h1,
.header p {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 1px 0 rgba(0,0,0,0.15);
    font-weight: 800;
    letter-spacing: 1px;
} 