* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: opacity 0.3s, transform 0.3s;
}

.nav-back:hover {
    opacity: 0.9;
    transform: translateX(-3px);
}

.nav-back:hover::before {
    transform: translateX(-3px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Intro Section */
.intro-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.intro-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.intro-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intro-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.intro-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: opacity 0.3s, box-shadow 0.3s;
}

.btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Framework Section */
.framework-section {
    margin-bottom: 4rem;
}

.framework-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.framework-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.framework-box > p {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    color: white;
}

.step-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-content code {
    background: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.step-content ul {
    list-style: none;
    padding-left: 0;
}

.step-content li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.step-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Key Metrics */
.key-metrics {
    margin-bottom: 4rem;
}

.key-metrics h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.metric-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.metric-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.15);
}

.metric-term {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.metric-def {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--card-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }
}

/* AARRR Specific */
.aarr-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.aarr-stage {
    flex: 1;
    min-width: 150px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.aarr-stage:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.aarr-stage .letter {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.aarr-stage .name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.aarr-stage .chinese {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.aarr-stage .metrics {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.aarr-arrow {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Chart Container */
.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    height: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Funnel Chart */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.funnel-stage {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.funnel-label {
    width: 150px;
    text-align: right;
    font-weight: bold;
    color: var(--text-primary);
}

.funnel-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.funnel-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: width 1s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.funnel-bar:hover {
    transform: scaleX(1.02);
}

.funnel-value {
    position: absolute;
    right: -100px;
    color: var(--secondary-color);
    font-weight: bold;
}

.funnel-rate {
    position: absolute;
    left: -80px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Recommendation Flow */
.rec-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.rec-stage {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.rec-stage::before {
    content: "↓";
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--primary-color);
}

.rec-stage:last-child::before {
    display: none;
}

.rec-stage h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.rec-stage p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.rec-algorithms {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.rec-algo {
    background: var(--bg-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
}

/* Section Title */
.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Content Section */
.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.formula-box {
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.formula-box code {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.highlight-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.highlight-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.info-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-card,
.info-card,
.metric-item {
    animation: fadeInUp 0.6s ease-out;
}
