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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.back-button {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.architecture-map {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.layer {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1976D2;
}

.layer-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-title {
    font-size: 22px;
    color: #1a237e;
    font-weight: bold;
}

.layer-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

/* Estilos específicos para la Capa 3 */
.layer-3 .component-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.layer-3 .component-title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.layer-3 .component-description {
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

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

.component-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #1976D2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.component-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.component-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.component-title {
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 5px;
    font-size: 15px;
}

.component-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Colores específicos para cada capa */
.layer-1 .layer-icon { background: linear-gradient(135deg, #1976D2, #64B5F6); }
.layer-1 .component-card { border-left-color: #1976D2; }

.layer-2 .layer-icon { background: linear-gradient(135deg, #388E3C, #66BB6A); }
.layer-2 .component-card { border-left-color: #388E3C; }

.layer-3 .layer-icon { background: linear-gradient(135deg, #F57C00, #FFA726); }
.layer-3 .component-card { border-left-color: #F57C00; }

.layer-4 .layer-icon { background: linear-gradient(135deg, #7B1FA2, #AB47BC); }
.layer-4 .component-card { border-left-color: #7B1FA2; }

.layer-5 .layer-icon { background: linear-gradient(135deg, #00897B, #26A69A); }
.layer-5 .component-card { border-left-color: #00897B; }

.layer-maturity .layer-icon { background: linear-gradient(135deg, #D32F2F, #EF5350); }
.layer-maturity .component-card { border-left-color: #D32F2F; }

/* Estilos para el ciclo de vida */
.lifecycle-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.lifecycle-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.lifecycle-phase {
    flex: 1;
    background: #E3F2FD;
    border-radius: 8px;
    padding: 12px;
    margin: 0 5px;
    text-align: center;
    border: 2px solid #1976D2;
    font-size: 12px;
    font-weight: bold;
    color: #1a237e;
}

.lifecycle-arrow {
    text-align: center;
    font-size: 20px;
    color: #1976D2;
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .components-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .lifecycle-row {
        flex-wrap: wrap;
    }
    
    .lifecycle-phase {
        flex: 1 0 45%;
        margin: 5px;
    }
}

@media (max-width: 768px) {
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .lifecycle-phase {
        flex: 1 0 100%;
    }
}