/* TikTok Marketing Guide — Shared Stylesheet */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: #2a2a3a;
    --text-primary: #e8e8f0;
    --text-secondary: #9898aa;
    --text-muted: #6a6a7a;
    --accent: #fe2c55;
    --accent-glow: rgba(254, 44, 85, 0.15);
    --accent-secondary: #25f4ee;
    --accent-secondary-glow: rgba(37, 244, 238, 0.15);
    --gradient-tiktok: linear-gradient(135deg, #25f4ee, #fe2c55);
    --radius: 12px;
}

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

body {
    font-family: 'Heebo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

/* ===== Navigation ===== */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo span {
    background: var(--gradient-tiktok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.nav-back:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

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

/* ===== Chapter Header ===== */
.chapter-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    border-bottom: 1px solid var(--border);
}

.chapter-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.chapter-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-tiktok);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.chapter-phase {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.phase-foundation { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.phase-growth { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.phase-mastery { background: rgba(254, 44, 85, 0.15); color: #fe2c55; }

.chapter-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.chapter-header .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Table of Contents ===== */
.toc {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.toc-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.toc-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.toc-list a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.toc-list a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border);
}

/* ===== Content ===== */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px 100px;
}

.content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 56px 0 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    scroll-margin-top: 80px;
}

.content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 14px;
    color: var(--accent-secondary);
}

.content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.content p {
    margin-bottom: 18px;
    font-size: 16.5px;
    line-height: 1.9;
    color: var(--text-primary);
}

.content ul, .content ol {
    margin: 0 24px 20px 0;
    padding: 0;
}

.content li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.content li strong {
    color: var(--text-primary);
}

.content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.content em {
    color: var(--accent-secondary);
    font-style: normal;
}

/* ===== Callout Boxes ===== */
.tip, .example, .warning, .stat-box {
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 24px 0;
    font-size: 15px;
}

.tip {
    background: rgba(37, 244, 238, 0.08);
    border: 1px solid rgba(37, 244, 238, 0.2);
    border-right: 4px solid var(--accent-secondary);
}

.example {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-right: 4px solid #818cf8;
}

.warning {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-right: 4px solid #facc15;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-box .big-number {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-tiktok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.callout-title {
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

/* ===== Tables ===== */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.content th {
    background: var(--bg-card);
    padding: 12px 16px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

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

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

/* ===== Step Boxes (Ch2) ===== */
.step-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0;
}

.step-box .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient-tiktok);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-left: 12px;
}

.step-box h4 {
    display: inline;
    margin: 0;
}

.step-box p {
    margin-top: 12px;
}

/* ===== Checklist ===== */
.checklist {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.checklist li {
    padding: 8px 0;
    padding-right: 28px;
    position: relative;
}

.checklist li::before {
    content: "[ ]";
    position: absolute;
    right: 0;
    color: var(--accent-secondary);
    font-family: monospace;
}

/* ===== Chapter Navigation ===== */
.chapter-nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
}

.chapter-nav a {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    max-width: 45%;
}

.chapter-nav a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.chapter-nav .label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.chapter-nav .title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

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

/* ===== Hero (Landing Page) ===== */
.hero {
    position: relative;
    padding: 100px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--accent-glow), transparent 50%),
                radial-gradient(circle at 70% 50%, var(--accent-secondary-glow), transparent 50%);
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    background: var(--gradient-tiktok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-tiktok);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Chapters Grid (Landing Page) ===== */
.chapters-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.phase-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 32px;
}

.phase-label.phase-foundation { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.phase-label.phase-growth { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.phase-label.phase-mastery { background: rgba(254, 44, 85, 0.15); color: #fe2c55; border: 1px solid rgba(254, 44, 85, 0.3); }

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 64px;
}

.chapter-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-tiktok);
    opacity: 0;
    transition: opacity 0.3s;
}

.chapter-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(254, 44, 85, 0.3);
    transform: translateY(-2px);
}

.chapter-card:hover::before {
    opacity: 1;
}

.chapter-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-tiktok);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.chapter-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.chapter-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.chapter-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.chapter-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero { padding: 60px 20px 50px; }
    .hero-stats { gap: 24px; }
    .chapters-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .chapter-header { padding: 40px 20px 30px; }
    .content { padding: 20px 20px 60px; }
    .content h2 { font-size: 24px; }
    .chapter-nav { flex-direction: column; }
    .chapter-nav a { max-width: 100%; }
}
