/* AI 编程教程 - 维度探索工作室主题 */
:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --dark: #0f172a;
    --darker: #020617;
    --bg-primary: #0d1117;
    --bg-secondary: rgba(99,102,241,0.08);
    --bg-card: rgba(99,102,241,0.1);
    --bg-card-hover: rgba(99,102,241,0.16);
    --border: rgba(99,102,241,0.2);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #3fb950;
    --green-bg: rgba(63,185,80,0.15);
    --orange: #d29922;
    --orange-bg: rgba(210,153,34,0.15);
    --red: #f85149;
    --red-bg: rgba(248,81,73,0.15);
    --purple: #8b5cf6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 24px rgba(99,102,241,0.12);
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    background-attachment: fixed;
}

/* Header */
.header {
    background: rgba(99,102,241,0.08);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99,102,241,0.2);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    font-weight: 800;
}

.logo-sub {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
}

.brand-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.brand-link:hover { color: var(--primary); }

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
    padding: 10px 18px;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition);
    font-family: inherit;
    position: relative;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-tab.active {
    color: var(--primary);
    background: var(--bg-card);
    border-color: var(--border);
    border-bottom-color: transparent;
}

.nav-tab .badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    background: var(--primary);
    color: #fff;
    vertical-align: middle;
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active { display: block; }

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 48px 24px 32px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(99,102,241,0.15);
}

.card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-success {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}

.btn-success:hover { background: rgba(63,185,80,0.25); }

.btn-warning {
    background: var(--orange-bg);
    border-color: var(--orange);
    color: var(--orange);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
}

/* Step List */
.step-list {
    list-style: none;
    counter-reset: step;
}

.step-list li {
    counter-increment: step;
    padding: 16px 16px 16px 60px;
    position: relative;
    border-left: 2px solid var(--border);
    margin-left: 20px;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: -24px;
    top: 14px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.step-list li h4 {
    margin-bottom: 4px;
    font-size: 16px;
}

.step-list li p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Code Block */
.code-block {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.code-block .lang {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 60px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.copy-btn:hover { color: var(--primary); border-color: var(--primary); }

/* Price Table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.price-table th,
.price-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.price-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    background: var(--bg-secondary);
}

.price-table tr:hover td { background: var(--bg-card-hover); }

.price-table .highlight { color: var(--green); font-weight: 600; }

/* Info Boxes */
.info-box {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 14px;
    border-left: 4px solid;
}

.info-box.info {
    background: rgba(99,102,241,0.12);
    border-color: var(--primary);
    color: #a5b4fc;
}

.info-box.success {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}

.info-box.warning {
    background: var(--orange-bg);
    border-color: var(--orange);
    color: var(--orange);
}

.info-box.danger {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}

/* Tips */
.tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Video Embed */
.video-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    margin: 16px 0;
}

.video-container video {
    width: 100%;
    display: block;
}

/* Accordion / FAQ */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-header {
    padding: 16px 20px;
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.accordion-header:hover { background: var(--bg-card-hover); }

.accordion-header .arrow {
    transition: transform var(--transition);
    font-size: 12px;
    color: var(--text-secondary);
}

.accordion-item.open .accordion-header .arrow { transform: rotate(180deg); }

.accordion-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.open .accordion-body {
    max-height: 2000px;
    padding: 16px 20px;
}

/* Affiliate Links */
.affiliate-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    transition: all var(--transition);
}

.affiliate-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.affiliate-card h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.affiliate-card .url {
    color: var(--primary);
    font-size: 13px;
    font-family: monospace;
    word-break: break-all;
}

.affiliate-card .desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
}

/* Tag */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
}

.tag-green { background: var(--green-bg); color: var(--green); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-blue { background: rgba(99,102,241,0.2); color: var(--primary); }
.tag-purple { background: rgba(139,92,246,0.2); color: var(--purple); }

/* Footer */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { color: var(--accent-hover); }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 24px; }
    .card-grid { grid-template-columns: 1fr; }
    .nav-tabs { gap: 2px; padding: 0 12px; }
    .nav-tab { padding: 8px 12px; font-size: 12px; }
    .header-inner { padding: 0; }
    .main { padding: 0 12px 40px; }
    .btn-group { flex-direction: column; }
}

/* Selection */
::selection { background: rgba(99,102,241,0.3); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
