/* CSR-specific styles */
.csr-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

/* CSR Theme Variables */

.process-flow {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.flow-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.step-content h4 {
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
}

.characteristic-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.characteristic-item h4 {
    color: var(--text-primary);
}

.characteristic-item p {
    color: var(--text-secondary);
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.header-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.back-btn {
    background: #6b7280;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* CSR Introduction Styles */
.csr-intro {
    margin-top: 30px;
}

.definition-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.definition-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-primary);
    box-shadow: var(--shadow);
}

.definition-card h3 {
    color: var(--accent-primary);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.definition-card p {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.process-flow {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-success);
    box-shadow: var(--shadow);
}

.process-flow h3 {
    color: var(--accent-success);
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
}

.flow-steps {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    min-width: 150px;
    flex: 1;
}

.step-number {
    background: var(--accent-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-align: center;
}

.step-content p {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.4;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: bold;
}

.csr-characteristics {
    background: var(--bg-accent);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-info);
    box-shadow: var(--shadow);
}

.csr-characteristics h3 {
    color: var(--accent-info);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.characteristics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.characteristic-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-info);
}

.char-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.characteristic-item h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.characteristic-item p {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Architecture Styles */
.architecture-content {
    margin-top: 30px;
}

.architecture-diagram {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    border-left: 5px solid var(--accent-secondary);
    box-shadow: var(--shadow);
}

.architecture-diagram h3 {
    color: var(--accent-secondary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.arch-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.arch-layer {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-secondary);
}

.arch-layer h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.layer-components {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.layer-components span {
    background: #ede9fe;
    color: #6b21a8;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.browser-layer {
    border-left-color: var(--accent-error);
}

.framework-layer {
    border-left-color: var(--accent-primary);
}

.app-layer {
    border-left-color: var(--accent-success);
}

.data-layer {
    border-left-color: var(--accent-warning);
}

.browser-layer .layer-components span {
    background: #fee2e2;
    color: #dc2626;
}

.framework-layer .layer-components span {
    background: #dbeafe;
    color: #2563eb;
}

.app-layer .layer-components span {
    background: #d1fae5;
    color: #059669;
}

.data-layer .layer-components span {
    background: #fef3c7;
    color: #d97706;
}

.tech-stack {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--text-secondary);
    box-shadow: var(--shadow);
}

.tech-stack h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.stack-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.stack-category {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stack-category h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.tech-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-item {
    background: var(--bg-accent);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.tech-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tech-item.react {
    background: #dbeafe;
    color: var(--accent-primary);
}

.tech-item.vue {
    background: #dcfce7;
    color: #166534;
}

.tech-item.angular {
    background: #fef3c7;
    color: #92400e;
}

.tech-item.svelte {
    background: #fde2e8;
    color: #be185d;
}

/* Comparison Styles */
.comparison-content {
    margin-top: 30px;
}

.comparison-visual {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: center;
}

.comparison-side {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.traditional {
    border-top: 4px solid var(--accent-error);
}

.csr {
    border-top: 4px solid var(--accent-primary);
}

.comparison-side h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.page-flow {
    margin-bottom: 20px;
}

.page-request {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.request-step {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.request-step.final {
    background: var(--accent-success);
    color: white;
    font-weight: 600;
}

.arrow-down {
    color: var(--text-secondary);
    font-size: 1.2rem;
    text-align: center;
    margin: 5px 0;
}

.vs-divider {
    background: #6b7280;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.approach-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.stat-item.positive {
    background: #dcfce7;
    color: #166534;
}

.stat-item.negative {
    background: #fee2e2;
    color: #dc2626;
}

.stat-value {
    font-weight: 600;
}

.detailed-comparison {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.detailed-comparison h3 {
    color: #4338ca;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.6rem;
}

.comparison-table {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: contents;
}

.table-header span {
    background: #374151;
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: center;
}

.table-row {
    display: contents;
}

.table-row span {
    background: var(--bg-card);
    padding: 12px 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.table-row span:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-primary);
}

/* Demo Styles */
.demo-content {
    margin-top: 30px;
}

.demo-explanation {
    background: var(--bg-accent);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-info);
    border: 1px solid var(--border-color);
}

.demo-explanation h3 {
    color: var(--accent-info);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.demo-explanation p {
    color: var(--text-primary);
    line-height: 1.6;
}

.spa-demo-container {
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.demo-app {
    min-height: 400px;
}

.demo-nav {
    background: #1f2937;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-logo {
    font-size: 1.2rem;
    font-weight: bold;
}

.demo-nav-links {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #374151;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background: #374151;
    color: white;
}

.nav-btn.active {
    background: #3b82f6;
    color: white;
    border-color: var(--accent-primary);
}

.demo-content-area {
    padding: 30px;
    min-height: 300px;
    position: relative;
}

.demo-page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.demo-page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-page h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.demo-page p {
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.demo-page ul {
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 20px;
}

.demo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.demo-stat {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-top: 3px solid var(--accent-primary);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.interactive-element {
    background: var(--bg-accent);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

#interactiveBtn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

#interactiveBtn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

#interactionResult {
    margin-top: 15px;
    padding: 10px;
    background: #dcfce7;
    border-radius: 6px;
    color: #166534;
    display: none;
}

.products-container {
    position: relative;
    min-height: 200px;
}

.loading-simulation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.product-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    border: 1px solid var(--border-color);
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.product-price {
    color: #059669;
    font-weight: 500;
}

#loadMoreProducts {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#loadMoreProducts:hover {
    background: #059669;
    transform: translateY(-1px);
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.demo-form button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.demo-form button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

#formResult {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    display: none;
}

#formResult.success {
    background: #dcfce7;
    color: #166534;
    display: block;
}

.demo-metrics {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-primary);
    border: 1px solid var(--border-color);
}

.demo-metrics h4 {
    color: #4338ca;
    margin-bottom: 15px;
}

.metrics-display {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Performance Styles */
.performance-content {
    margin-top: 30px;
}

.performance-overview {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    border-left: 5px solid var(--accent-warning);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.performance-overview h3 {
    color: #92400e;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.performance-chart {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chart-container {
    max-width: 600px;
    margin: 0 auto;
}

.chart-timeline {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: center;
    height: 200px;
}

.timeline-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.segment-bar {
    width: 60px;
    background: linear-gradient(to top, #ef4444, #fca5a5);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}

.timeline-segment.navigation .segment-bar {
    background: linear-gradient(to top, #10b981, #6ee7b7);
}

.timeline-segment.interaction .segment-bar {
    background: linear-gradient(to top, #3b82f6, #93c5fd);
}

.segment-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.segment-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.performance-factors {
    margin-bottom: 40px;
}

.performance-factors h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.factor-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--text-secondary);
}

.factor-card.negative {
    border-top-color: #ef4444;
}

.factor-card.positive {
    border-top-color: #10b981;
}

.factor-card.mixed {
    border-top-color: #f59e0b;
}

.factor-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.factor-card h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.factor-details p {
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.6;
}

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

.factor-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.factor-metrics span {
    background: var(--bg-accent);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.optimization-tips {
    background: var(--bg-accent);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-success);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.optimization-tips h3 {
    color: #166534;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-category {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.tip-category h4 {
    color: #166534;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.tip-category ul {
    list-style: none;
    padding: 0;
}

.tip-category li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tip-category li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Bundle Splitting Styles */
.splitting-content {
    margin-top: 30px;
}

.splitting-overview {
    margin-bottom: 40px;
}

.splitting-overview h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.problem-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.problem-side,
.solution-side {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.problem-side {
    border-top: 4px solid #ef4444;
}

.solution-side {
    border-top: 4px solid #10b981;
}

.problem-side h4,
.solution-side h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.problem-side h4 {
    color: #dc2626;
}

.solution-side h4 {
    color: #059669;
}

.bundle-visual {
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.large-bundle {
    background: #fee2e2;
}

.split-bundles {
    background: #dcfce7;
}

.bundle-item {
    background: var(--bg-card);
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.bundle-item.main {
    border-left: 4px solid #3b82f6;
}

.bundle-item.lazy {
    border-left: 4px solid #10b981;
}

.bundle-stats {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bundle-stats span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.problem-side p,
.solution-side p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin-top: 10px;
}

.splitting-strategies {
    margin-bottom: 40px;
}

.splitting-strategies h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.strategy-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
}

.strategy-card h4 {
    color: #4338ca;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.code-example {
    background: #1f2937;
    color: #e5e7eb;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.strategy-benefits {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.strategy-benefits span {
    background: var(--bg-accent);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.splitting-demo {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-secondary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.splitting-demo h3 {
    color: #6b21a8;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.bundle-analyzer {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.analyzer-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.analyzer-controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analyze-btn {
    background: #3b82f6;
    color: white;
}

.analyze-btn:hover {
    background: #2563eb;
}

.split-btn {
    background: #10b981;
    color: white;
}

.split-btn:hover {
    background: #059669;
}

.reset-btn {
    background: #6b7280;
    color: white;
}

.reset-btn:hover {
    background: #4b5563;
}

.analysis-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.bundle-breakdown {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-primary);
    border: 1px solid var(--border-color);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.item-size {
    font-weight: 600;
    color: var(--text-primary);
}

.performance-impact {
    background: var(--bg-accent);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-success);
    border: 1px solid var(--border-color);
}

.performance-impact h4 {
    color: #166534;
    margin-bottom: 15px;
}

.impact-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.metric-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Summary Styles */
.summary-content {
    margin-top: 30px;
}

.csr-summary {
    margin-bottom: 40px;
}

.csr-summary h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.takeaways-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.takeaway-item {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.takeaway-item.pros {
    border-top: 4px solid #10b981;
}

.takeaway-item.cons {
    border-top: 4px solid #ef4444;
}

.takeaway-item h4 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.pros h4 {
    color: #059669;
}

.cons h4 {
    color: #dc2626;
}

.takeaway-item ul {
    list-style: none;
    padding: 0;
}

.takeaway-item li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
}

.pros li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.cons li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

.best-practices {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.best-practices h3 {
    color: #4338ca;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.practices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.practice-category {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.practice-category h4 {
    color: #4338ca;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.practice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.practice-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.practice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.practice-content h5 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1rem;
}

.practice-content p {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.when-to-use {
    margin-bottom: 40px;
}

.when-to-use h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.use-cases {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.use-case {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.use-case.ideal {
    border-top: 4px solid #10b981;
}

.use-case.avoid {
    border-top: 4px solid #ef4444;
}

.use-case h4 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.ideal h4 {
    color: #059669;
}

.avoid h4 {
    color: #dc2626;
}

.use-case ul {
    list-style: none;
    padding: 0;
}

.use-case li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
}

.ideal li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.avoid li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

.next-steps {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.next-steps h3 {
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.next-steps p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}

.next-topic-btn {
    background: var(--bg-card);
    color: var(--accent-primary);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.next-topic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {

    .definition-section,
    .comparison-visual,
    .problem-solution,
    .takeaways-grid,
    .use-cases,
    .analysis-results {
        grid-template-columns: 1fr;
    }

    .flow-steps,
    .demo-stats,
    .metrics-display {
        flex-direction: column;
        align-items: center;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .vs-divider {
        margin: 20px 0;
    }

    .comparison-table {
        grid-template-columns: 1fr;
    }

    .strategies-grid {
        grid-template-columns: 1fr;
    }

    .code-example {
        font-size: 0.7rem;
    }

    .analyzer-controls {
        flex-direction: column;
        align-items: center;
    }

    .analyzer-controls button {
        width: 100%;
        max-width: 200px;
    }
}