/* ============================================
 * Suno 使用教程页面样式（2026-09-12 新增）
 * 与 home.css 暗色主题保持一致
 * ============================================ */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========== 整体布局 ========== */
.tutorial-app {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ========== 左侧：目录侧栏 ========== */
.tutorial-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #111;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.tutorial-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tsh-icon {
    font-size: 22px;
}

.tsh-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.tutorial-menu {
    list-style: none;
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.tutorial-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
    user-select: none;
}

.tutorial-menu li:hover {
    background: #1a1a1a;
    color: #fff;
}

.tutorial-menu li.active {
    background: linear-gradient(90deg, rgba(249,115,22,0.18), rgba(236,72,153,0.06));
    color: #fff;
    border-left-color: #f97316;
}

.tm-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.tm-title {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-read {
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
}

.tutorial-sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid #222;
    flex-shrink: 0;
}

.tsf-tip {
    font-size: 11px;
    color: #555;
}

/* ========== 右侧：详情主区 ========== */
.tutorial-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 48px;
    min-width: 0;
    background: #0a0a0a;
}

/* 自定义滚动条 */
.tutorial-content::-webkit-scrollbar,
.tutorial-menu::-webkit-scrollbar {
    width: 8px;
}
.tutorial-content::-webkit-scrollbar-track,
.tutorial-menu::-webkit-scrollbar-track {
    background: transparent;
}
.tutorial-content::-webkit-scrollbar-thumb,
.tutorial-menu::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}
.tutorial-content::-webkit-scrollbar-thumb:hover,
.tutorial-menu::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* 占位页 */
.tutorial-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #555;
}

.tph-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.tph-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.tph-sub {
    font-size: 12px;
    color: #444;
}

/* 详情容器 */
.tutorial-detail {
    max-width: 760px;
    margin: 0 auto;
    animation: fadeIn 0.25s ease-out;
}

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

.td-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #222;
}

.td-back {
    background: transparent;
    border: 1px solid #333;
    color: #aaa;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-bottom: 16px;
    transition: all 0.15s;
}

.td-back:hover {
    border-color: #f97316;
    color: #fff;
    background: rgba(249,115,22,0.05);
}

.td-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.td-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

.td-meta span:not(:first-child)::before {
    content: '·';
    margin-right: 16px;
    color: #444;
}

/* ========== 正文排版 ========== */
.td-body h2 {
    font-size: 19px;
    color: #fff;
    margin: 32px 0 12px;
    font-weight: 600;
    padding-top: 8px;
}

.td-body h2:first-child {
    margin-top: 8px;
}

.td-body h3 {
    font-size: 16px;
    color: #fff;
    margin: 22px 0 10px;
    font-weight: 600;
}

.td-body p {
    margin-bottom: 12px;
    color: #d4d4d4;
}

.td-body strong {
    color: #fff;
    font-weight: 600;
}

.td-body ul, .td-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.td-body li {
    margin-bottom: 6px;
    color: #d4d4d4;
}

.td-body li::marker {
    color: #f97316;
}

.td-body code {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    color: #f97316;
}

/* 占位图（教程截图位置） */
.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 640px;
    height: 220px;
    margin: 16px auto;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border: 1px dashed #333;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.placeholder-img::before {
    content: '🖼  ' attr(data-caption);
    display: block;
    line-height: 1.5;
}

/* 提示框 */
.td-body .tip-box {
    background: rgba(249,115,22,0.05);
    border-left: 3px solid #f97316;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    color: #d4d4d4;
    font-size: 13px;
}

.td-body .tip-box strong {
    color: #f97316;
}

/* FAQ 问答对 */
.td-body .faq-item {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.td-body .faq-q {
    color: #f97316;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.td-body .faq-a {
    color: #d4d4d4;
    font-size: 13px;
    line-height: 1.7;
}

/* 教程内可点击链接（2026-09-13 新增：FAQ 中「开通订阅」跳转链接）
   与 .faq-q 橙色一致，hover 加深并显示下划线 */
.td-body a.tutorial-link,
.td-body .tutorial-link {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    transition: color 0.15s, border-color 0.15s;
}
.td-body a.tutorial-link:hover,
.td-body .tutorial-link:hover {
    color: #fb923c;
    border-bottom-color: #fb923c;
}

/* ========== 底部导航 ========== */
.td-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.td-prev, .td-next {
    flex: 1;
    padding: 12px 16px;
    background: #141414;
    border: 1px solid #262626;
    color: #aaa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    text-align: center;
    max-width: 200px;
}

.td-prev:hover:not(:disabled),
.td-next:hover:not(:disabled) {
    border-color: #f97316;
    color: #fff;
    background: #1f1f1f;
}

.td-prev:disabled, .td-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.td-next {
    margin-left: auto;
}

/* ========== 响应式：小屏单栏 ========== */
@media (max-width: 768px) {
    .tutorial-app {
        flex-direction: column;
    }
    .tutorial-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #222;
    }
    .tutorial-menu {
        max-height: 140px;
    }
    .tutorial-content {
        padding: 20px;
    }
    .td-title {
        font-size: 22px;
    }
    .td-body h2 {
        font-size: 17px;
    }
}
