/* Global Styles */
:root {
    --primary: #0b3a6e;
    --primary-light: #145ea8;
    --accent-blue: #1e88e5;
    --shopee: #EE4D2D;
    --grab: #00B14F;
    --be: #FFD424;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Encode Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

#interactive-container {
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    max-width: 1000px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.section:nth-child(even) {
    background: #f1f5f9;
}

/* Abstract backgrounds */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.overview::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm66-3c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-46-45c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm54 0c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM57 7c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-8 48c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM25 34c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm23 40c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-44 5c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm47 25c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm18-54c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zM27 6c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm62 7c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-6 24c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-40 4c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm23 23c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1z'%20fill='%231e88e5'%20fill-opacity='0.05'%20fill-rule='evenodd'/%3E%3C/svg%3E");
}

.title-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    display: block;
    color: var(--accent-blue);
    opacity: 0.15;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.section:hover .title-icon {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
    color: var(--primary);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 20px 180px;
    color: var(--white);
    background: var(--primary);
    text-align: center;
}

.hero-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 30px;
}

.hero .highlight {
    color: var(--be);
    position: relative;
}

.growth-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 24px;
    display: inline-flex;
    flex-direction: column;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

.growth-value {
    font-size: 64px;
    font-weight: 800;
    color: var(--white);
}

.growth-label {
    font-size: 18px;
    opacity: 0.9;
}

.source {
    font-size: 14px;
    opacity: 0.7;
    font-style: italic;
}

/* Overview Section */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.overview-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.overview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(30, 136, 229, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(30, 136, 229, 0.1);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 24px;
}

.card-icon svg {
    width: 32px;
    height: 32px;
}

.overview-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--primary);
}

.overview-card p {
    color: var(--text-muted);
    font-size: 15px;
}

.card-path {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
}

/* Market Share Section */
.share-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.chart-container {
    width: 300px;
    height: 300px;
    position: relative;
}

.donut-chart {
    width: 100%;
    height: 100%;
}

.chart-center-text {
    font-size: 10px;
    font-weight: 800;
    fill: var(--primary);
}

.share-legend {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    padding: 12px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    cursor: default;
}

.legend-item:hover {
    background: #f1f5f9;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.shopee {
    background: var(--shopee);
}

.dot.grab {
    background: var(--grab);
}

.dot.be {
    background: var(--be);
}

.dot.xanhsm {
    background: var(--primary);
}

.legend-item .value {
    margin-left: auto;
    color: var(--primary);
}

/* Timeline Section */
.timeline-container {
    position: relative;
    padding: 40px 0;
}

.timeline-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 60px;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    padding-right: 60px;
    text-align: right;
    left: 0;
}

.timeline-item.right {
    padding-left: 60px;
    text-align: left;
    left: 50%;
}

.timeline-content {
    background: var(--white);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    display: inline-block;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 24px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 4px solid var(--accent-blue);
    border-radius: 50%;
    z-index: 3;
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-item .year {
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 8px;
    font-size: 18px;
}

/* Strategy Race Section */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.strategy-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-header {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-header h3 {
    position: relative;
    z-index: 2;
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
}

.strategy-list {
    list-style: none;
    padding: 40px 30px;
}

.strategy-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.li-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 4px;
}

/* ASEAN Section */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bar-item {
    width: 100%;
}

.bar-label {
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--primary);
}

.bar-outer {
    height: 30px;
    background: #f1f5f9;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-blue));
    border-radius: 15px;
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Trends Section */
.trends-cloud {
    height: 400px;
    position: relative;
    background: #f8fafc;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud-svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.trend-node {
    position: absolute;
    padding: 15px 25px;
    background: var(--white);
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    color: var(--primary);
    border: 2px solid var(--accent-blue);
    z-index: 2;
    animation: sway 4s ease-in-out infinite alternate;
}

.trend-node:nth-child(2) {
    animation-delay: 0s;
}

.trend-node:nth-child(3) {
    animation-delay: 0.5s;
}

.trend-node:nth-child(4) {
    animation-delay: 1s;
}

.trend-node:nth-child(5) {
    animation-delay: 1.5s;
}

/* Footer */
.footer {
    padding: 60px 0;
    background: var(--primary);
    color: var(--white);
    text-align: center;
    border-radius: 40px 40px 0 0;
}

.footer p {
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes sway {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(10px, 10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .growth-value {
        font-size: 48px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .compare-grid {
        grid-template-columns: 1fr;
    }

    .share-flex {
        gap: 30px;
    }

    .timeline-item {
        width: 100% !important;
        left: 0 !important;
        text-align: left !important;
        padding: 0 0 0 30px !important;
    }

    .timeline-item::after {
        left: -10px !important;
    }

    .timeline-path {
        display: none;
    }

    .trends-cloud {
        height: 500px;
    }

    .trend-node {
        position: static;
        margin-bottom: 15px;
    }

    .trends-cloud {
        flex-direction: column;
        padding: 40px;
    }

    .cloud-svg {
        display: none;
    }
}