/* ============================================
   星光漫界入门教程 - 统一设计系统
   与 Landing.html / userguide.html 风格一致
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #FDFDFE;
    --bg-secondary: #F1F5F9;
    --bg-card: #FFFFFF;
    --border-color: rgba(167, 143, 250, 0.15);
    --border-light: rgba(167, 143, 250, 0.08);
    --text-primary: #302A68;
    --text-secondary: #4B5563;
    --text-muted: #94A3B8;
    --accent: #A78BFA;
    --accent-deep: #6D28D9;
    --accent-gold: #FBBF24;
    --accent-teal: #06B6D4;
    --accent-red: #EF4444;
    --success: #22C55E;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Navbar (matches userguide.html) === */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(167, 143, 250, 0.2);
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    height: 42px;
    object-fit: contain;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-pill {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-pill-purple {
    color: #A78BFA;
    background: rgba(167, 143, 250, 0.12);
    border: 1px solid rgba(167, 143, 250, 0.35);
}
.nav-pill-purple:hover { background: rgba(167, 143, 250, 0.22); }

.nav-pill-orange {
    color: #F97316;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.35);
}
.nav-pill-orange:hover { background: rgba(249, 115, 22, 0.22); }

.btn-premium {
    background: linear-gradient(135deg, #6D28D9, #302A68);
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.25);
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(109, 40, 217, 0.35);
}

/* === Hero === */
.hero {
    padding: 160px 40px 80px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(167, 143, 250, 0.08) 0%, transparent 60%);
}

.hero-badge {
    display: inline-block;
    background: rgba(167, 143, 250, 0.12);
    border: 1px solid rgba(167, 143, 250, 0.3);
    color: var(--accent-deep);
    font-size: 13px;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #302A68, #6D28D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-meta span {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-contact {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.hero-contact span {
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-contact a {
    color: var(--accent-deep);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}
.hero-contact a:hover { color: var(--accent); }

/* === Layout === */
.container {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* === Sidebar === */
.sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 30px 20px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-card);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
.sidebar h3 {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all .2s;
    border: 1px solid transparent;
}
.nav-link:hover {
    background: rgba(167, 143, 250, 0.08);
    border-color: var(--border-color);
    color: var(--accent-deep);
}
.nav-link .nav-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: linear-gradient(135deg, #6D28D9, #302A68);
    border-radius: 6px;
    font-size: 11px;
    margin-right: 8px;
    color: #fff;
    font-weight: 700;
}

.info-card {
    margin-top: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.info-card h4 {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 700;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .val { color: var(--accent-deep); font-weight: 600; }

/* === Main Content === */
.main-content {
    padding: 40px 48px;
    max-width: 920px;
}

.main-content > p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
}

/* === Step Blocks === */
.step-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    scroll-margin-top: 92px; /* 72px navbar + 20px breathing room */
}
.step-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    background: linear-gradient(90deg, rgba(167, 143, 250, 0.08) 0%, rgba(109, 40, 217, 0.04) 100%);
    border-bottom: 1px solid var(--border-color);
}
.step-icon { font-size: 24px; flex-shrink: 0; }
.step-num {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent);
    font-family: 'Monaco', 'Menlo', monospace;
    flex-shrink: 0;
    font-weight: 600;
}
.step-title {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    flex: 1;
}

.step-body { padding: 24px 28px; }
.step-body p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 15px;
}
.step-body p strong { color: var(--text-primary); font-weight: 600; }
.step-body h3.sub-heading {
    font-size: 15px;
    color: var(--accent-deep);
    margin: 20px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

/* === Images === */
.img-wrap {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    text-align: center;
    cursor: zoom-in;
}
.img-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform .3s ease;
}
.img-wrap:hover img { transform: scale(1.01); }

/* === Tip / Warn / Note === */
.tip, .warn, .note {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.7;
}
.tip {
    background: rgba(6, 182, 212, 0.08);
    border-left: 4px solid var(--accent-teal);
    color: var(--text-secondary);
}
.warn {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--accent-red);
    color: var(--text-secondary);
}
.note {
    background: rgba(251, 191, 36, 0.08);
    border-left: 4px solid var(--accent-gold);
    color: var(--text-secondary);
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(167, 143, 250, 0.3);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 32px 40px;
    border-top: 1px solid rgba(167, 143, 250, 0.2);
    background: #302A68;
}

.footer p {
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
    font-size: 14px;
    line-height: 1.8;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    opacity: 1;
    margin: 0 8px;
    font-size: 13px;
    transition: opacity 0.2s;
}
.footer a:hover { opacity: 1; }

.footer-links { margin-top: 8px; }

/* === Responsive === */
@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .main-content { padding: 24px 20px; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        height: 60px;
    }
    .nav-logo img { height: 32px; }
    /* Hide desktop nav buttons, show hamburger */
    .nav-buttons { display: none; }
    .navbar .hamburger { display: flex; }
    .nav-buttons .nav-pill { padding: 6px 12px; font-size: 11px; }
    .nav-buttons .btn-premium { padding: 8px 16px; font-size: 11px; }
    .nav-buttons { gap: 6px; }

    .hero {
        padding: 120px 20px 60px;
    }
    .hero h1 { font-size: 32px; }
    .section-title { font-size: 24px; }
    .footer { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .navbar { padding: 0 14px; }
    .nav-logo img { height: 28px; }
    .nav-pill { padding: 5px 10px; font-size: 10px; }
    .btn-premium { padding: 6px 12px; font-size: 10px; }
    .hero h1 { font-size: 28px; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(167, 143, 250, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(167, 143, 250, 0.4); }

/* === Hamburger Menu (Mobile) === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #302A68;
    border-radius: 2px;
    transition: all 0.15s ease;
}

/* === Mobile Menu Overlay === */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #FDFDFE;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(167, 143, 250, 0.15);
    background: #FDFDFE;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-menu-header .nav-logo img {
    height: 36px;
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #302A68;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 20px;
    overflow-y: auto;
}

.mobile-menu-item {
    display: block;
    padding: 18px 24px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid rgba(167, 143, 250, 0.15);
    color: #302A68;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mobile-menu-item:hover {
    background: rgba(167, 143, 250, 0.06);
    border-color: rgba(167, 143, 250, 0.35);
}

.mobile-menu-item-primary {
    background: linear-gradient(135deg, #6D28D9, #302A68);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.15rem;
    box-shadow: 0 8px 32px rgba(109, 40, 217, 0.3);
}

.mobile-menu-item-primary:hover {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(109, 40, 217, 0.4);
}
