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

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #005689 0%, #76a3cd 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 20px auto 0;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.logo {
    display: block;
    margin: 0 auto 10px;
    width: 200px;
    height: auto;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 600;
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 600;
}

h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5em;
    font-weight: 400;
}

.title-left {
    text-align: left;
    padding: 10px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.5em;
}

#porcentaje {
    text-align: left;
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 20px;
    margin-top: 40px;
    font-weight: 520;
}

.progress-bar {
    background: #ecf0f1;
    border-radius: 25px;
    height: 30px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 25px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.year-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid #667eea;
}

.year-title {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.cuatrimestre {
    margin-bottom: 30px;
}

.cuatrimestre-title {
    font-size: 1.2em;
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

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

.materia-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.materia-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.materia-card.completed {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6 0%, #e8f8f5 100%);
}

.materia-card.cursada {
    border-color: #4FB3FF;
    background: linear-gradient(135deg, #d1e7ff 0%, #f0f8ff 100%);
}

.materia-card.blocked {
    opacity: 0.6;
    background: #f8f9fa;
}

.materia-card.available {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
}

.materia-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.materia-codigo {
    font-size: 0.9em;
    color: #7f8c8d;
    font-weight: 500;
}

.materia-creditos {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.materia-nombre {
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.correlativas {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.correlativas-tag {
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 3px;
}

.botones-container {
    display: flex;
    gap: 8px;
}

.boton-cursada,
.boton-final {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #7f8c8d;
    border-radius: 6px;
    background: white;
    color: #7f8c8d;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.boton-cursada:not(.bloqueado):hover,
.boton-final:not(.bloqueado):hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.boton-cursada.completado {
    background: #4FB3FF;
    border-color: #4FB3FF;
    color: white;
}

.boton-cursada.completado:hover {
    background: #3a8cd9;
    border-color: #3a8cd9;
}

.boton-final.completado {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.boton-final.completado:hover {
    background: #1e8449;
    border-color: #1e8449;
}

.boton-cursada.bloqueado,
.boton-final.bloqueado {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.status-text {
    font-size: 0.9em;
    font-weight: 500;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.completed {
    background: linear-gradient(135deg, #d5f4e6 0%, #e8f8f5 100%);
    border: 2px solid #27ae60;
}

.legend-color.available {
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
    border: 2px solid #f39c12;
}

.legend-color.blocked {
    background: #f8f9fa;
    border: 2px solid #bdc3c7;
}

.boton {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
    box-shadow: #34495e 0px 6px 8px;
    font-family: 'Lato', sans-serif;
    font-weight: 520;
}

.boton:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.concentraciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.boton-concentracion {
    background: #8e27d6;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-family: 'Lato', sans-serif;
    font-weight: 550;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boton-concentracion:hover {
    background: #6900d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.boton-concentracion.focalizacion {
    background: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.boton-concentracion.focalizacion:hover {
    background: #c0392b;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.boton-concentracion.selected {
    background: #27ae60 !important;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5) !important;
    transform: translateY(-2px);
    border: 2px solid #1e7e34;
}

.boton-concentracion.selected:hover {
    background: #229954 !important;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.6) !important;
}

.no-selection {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1em;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px 0;
}

.electivas-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 2px solid #3498db;
}

.electivas-info p {
    margin: 10px 0;
    color: #2c3e50;
    font-weight: 500;
}

.footer {
    max-width: 1200px;
    margin: 20px auto 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: #2c3e50;
    font-weight: 400;
    font-size: 1em;
}

.footer-subtitle {
    color: #7f8c8d !important;
    font-size: 0.9em !important;
    margin-top: 5px !important;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.social-link:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .materias-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .legend {
        flex-direction: column;
        align-items: center;
    }

    .botones-container {
        flex-direction: column;
    }

    .boton-cursada,
    .boton-final {
        width: 100%;
    }

    #error-txt {
        font-size: 1.2em;
    }

    .footer {
        margin: 20px 20px 0;
        padding: 15px;
    }
    
    .footer-content p {
        font-size: 0.9em;
    }
    
    .footer-subtitle {
        font-size: 0.8em !important;
    }
}