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

:root {
    --optimizely-orange: #FF5000;
    --optimizely-blue: #0039A6;
    --optimizely-dark: #1A1A1A;
    --optimizely-light: #F5F5F5;
    --meta-color: #9b59b6;
    --domain-color: #0039A6;
    --upgrade-color: #FF5000;
    --dark: #1A1A1A;
    --light: #FFFFFF;
    --accent: #FF5000;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--optimizely-orange) 0%, var(--optimizely-blue) 100%);
    color: var(--dark);
    overflow: hidden;
}

/* Custom Scrollbar - Optimizely Branded */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--optimizely-orange), var(--optimizely-blue));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--optimizely-orange);
}

.section {
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.8s ease-in;
    overflow: hidden;
}

.section.active {
    display: flex;
}

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

.container {
    max-width: 1400px;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Section 1: The Monolith */
.monolith {
    background: linear-gradient(145deg, var(--optimizely-dark), #2d2d2d);
    border: 3px solid var(--optimizely-orange);
    border-radius: 20px;
    padding: 25px 100px;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transition: all 0.5s ease;
}

.monolith:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 80px rgba(255, 80, 0, 0.4);
}

.monolith-label {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--optimizely-orange);
    margin-bottom: 0;
}

.monolith-description {
    font-size: 1.2rem;
    color: #ccc;
    line-height: 2;
}

/* Section 2: Strategy */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
    max-height: 50vh;
    overflow-y: auto;
}

.strategy-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.strategy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.strategy-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--optimizely-orange), var(--optimizely-blue));
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.strategy-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.strategy-card p {
    font-size: 1.1rem;
    color: #666;
}

/* Section 3: Breakdown Animation */
.breakdown-container {
    height: 58vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.big-box {
    background: linear-gradient(145deg, var(--optimizely-orange), var(--optimizely-blue));
    color: white;
    font-size: 3rem;
    font-weight: bold;
    padding: 120px 100px;
    border-radius: 20px;
    border: 4px solid white;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: absolute;
    transition: all 1s ease;
}

.breakdown-level {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.breakdown-level.visible {
    opacity: 1;
}

.breakdown-box {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 20px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 40px 100px rgba(255, 80, 0, 0.4);
    }
}

.breakdown-box.major {
    background: linear-gradient(135deg, var(--optimizely-orange), #FF7733);
    color: white;
    font-size: 1.2rem;
    padding: 30px 40px;
    border: 2px solid white;
}

.breakdown-box.minor {
    background: white;
    font-size: 0.95rem;
}

/* Section 4: Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-15px);
}

.category-card.meta {
    border-top: 5px solid var(--meta-color);
}

.category-card.domain {
    border-top: 5px solid var(--domain-color);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.category-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.category-count {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--optimizely-orange);
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 12px;
}

.category-card ul {
    text-align: left;
    list-style: none;
    padding: 0;
    flex: 1;
    overflow: hidden;
}

.category-card ul li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 0.85rem;
}

.category-card ul li:last-child {
    border-bottom: none;
}

.total-count {
    margin: 20px 0;
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Section 5: Agents Gallery */
.agents-gallery {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.agent-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--optimizely-orange), var(--optimizely-blue));
}

.agent-card.meta::before {
    background: var(--meta-color);
}

.agent-card.domain::before {
    background: var(--domain-color);
}

.agent-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.agent-emoji {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.agent-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 4px;
    line-height: 1.2;
}

.agent-role {
    font-size: 0.7rem;
    color: #666;
    line-height: 1.3;
}

/* Section 6: Why It Works */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.benefit-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: scale(1.05);
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.benefit-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--optimizely-orange);
}

.benefit-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.conclusion {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--optimizely-orange);
}

.conclusion h2 {
    font-size: 2rem;
    color: var(--optimizely-orange);
    margin-bottom: 15px;
}

.conclusion-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Navigation Buttons */
.nav-button {
    background: linear-gradient(135deg, var(--optimizely-orange), #FF7733);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-button:disabled:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.nav-button.secondary {
    background: linear-gradient(135deg, var(--optimizely-blue), #0051CC);
}

.nav-button.back {
    background: linear-gradient(135deg, #666, #888);
    padding: 12px 30px;
    font-size: 1rem;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .agents-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .agents-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .categories-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .monolith {
        padding: 40px 30px;
    }

    .categories-grid,
    .benefits-grid,
    .strategy-grid {
        grid-template-columns: 1fr;
    }

    .agents-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Section Navigation Selector */
.section-nav-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #555;
    background: #2A2A2A;
    color: #999;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-nav-btn:hover {
    background: #3A3A3A;
    border-color: #FF5000;
    color: #FF5000;
    transform: translateY(-2px);
}

.section-nav-btn.active {
    background: linear-gradient(135deg, #FF5000, #E64800);
    border-color: #FF5000;
    color: white;
    box-shadow: 0 0 12px rgba(255, 80, 0, 0.5);
}
