.diagram-body {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    /* min-height: 100vh;     */
}
.diagram-container {
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: relative;
}

.title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 35px;
}

.layer {
    position: absolute;
    border-radius: 8px;
    padding: 20px;
    font-weight: 500;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-layer {
    top: 100px;
    left: 30px;
    right: 30px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    text-box: auto;
    font-size: 18px;
    line-height: 60px;
}

.client-layer {
    top: 220px;
    left: 30px;
    width: calc(33.33% - 40px);
    height: 250px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.proxy-layer {
    top: 220px;
    left: calc(33.33% + 10px);
    width: calc(33.33% - 20px);
    height: 250px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.backend-layer {
    top: 220px;
    right: 30px;
    width: calc(33.33% - 40px);
    height: 250px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.layer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
}

.layer-content {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
}

.layer-content div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.layer-content div::before {
    content: "▶";
    margin-right: 6px;
    font-size: 10px;
}

.bottom-text {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
}

.arrow {
    position: absolute;
    width: 40px;
    height: 3px;
    background: #34495e;
}

.arrow::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -4px;
    width: 0;
    height: 0;
    border-left: 10px solid #34495e;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.arrow-1 {
    top: 180px;
    left: calc(33.33% - 20px);
    transform: rotate(25deg);
}

.arrow-2 {
    top: 180px;
    right: calc(33.33% - 20px);
    transform: rotate(-25deg);
}

.arrow-3 {
    top: 345px;
    left: calc(33.33% - 10px);
}

.arrow-4 {
    top: 345px;
    right: calc(33.33% - 10px);
}

.security-badge {
    position: absolute;
    top: 170px;
    left: 50%;
    transform: translateX(-50%) rotate(-10deg);
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.performance-badge {
    position: absolute;
    top: 480px;
    left: 50%;
    transform: translateX(-50%) rotate(5deg);
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .diagram-container {
        padding: 20px;
        min-height: 800px;
    }

    .title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .auth-layer {
        top: 80px;
        left: 20px;
        right: 20px;
        height: 50px;
        font-size: 16px;
        line-height: 50px;
    }

    .client-layer, .proxy-layer, .backend-layer {
        position: static;
        width: 100%;
        height: auto;
        margin-bottom: 20px;
        min-height: 160px;
    }

    .layer-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .layer-content {
        font-size: 12px;
    }

    .arrow {
        display: none;
    }

    .security-badge {
        position: static;
        display: block;
        text-align: center;
        transform: none;
        margin: 10px auto;
        width: fit-content;
    }

    .performance-badge {
        position: static;
        display: block;
        text-align: center;
        transform: none;
        margin: 10px auto;
        width: fit-content;
    }

    .bottom-text {
        position: static;
        margin-top: 20px;
        font-size: 14px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .diagram-container {
        padding: 15px;
    }

    .title {
        font-size: 20px;
    }

    .auth-layer {
        font-size: 14px;
        height: 45px;
        line-height: 45px;
    }

    .layer-title {
        font-size: 14px;
    }

    .layer-content {
        font-size: 11px;
    }

    .security-badge, .performance-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .bottom-text {
        font-size: 13px;
    }
}

        .zoom-modal {
            backdrop-filter: blur(8px);
            animation: fadeIn 0.3s ease-out;
        }
        
        .zoom-svg {
            animation: zoomIn 0.3s ease-out;
            cursor: zoom-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes zoomIn {
            from { 
                opacity: 0;
                transform: scale(0.8);
            }
            to { 
                opacity: 1;
                transform: scale(1);
            }
        }
        
        .clickable-svg {
            cursor: pointer;
            
            transition: transform 0.2s ease;
        }
        
        .clickable-svg:hover {
            transform: scale(1.02);
        }