@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-light: rgba(255, 255, 255, 0.9);
    --disabled-bg: rgba(255, 255, 255, 0.05);
    --disabled-text: rgba(255, 255, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Elementos de fondo animados */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 10px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 600px;
}

.nav-button {
    background: none;
    border: none;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    min-width: 80px;
    line-height: 1.3;
}

.nav-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-button.active {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.nav-button.active:hover {
    background: var(--secondary-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

/* Estilo para botones deshabilitados */
.nav-button.disabled {
    background: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
    pointer-events: none;
    transition: none;
}

.nav-button.disabled::after {
    content: 'Próximamente';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--disabled-text);
    white-space: nowrap;
    font-weight: 400;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 30px 20px 20px;
    color: var(--text-light);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    background: var(--secondary-gradient);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Curriculum Grid */
.curriculum-section {
    padding: 40px 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 60px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.semester-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.semester-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.semester-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.semester-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.semester-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.complete-semester-btn, .clear-semester-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.complete-semester-btn {
    background: var(--accent-gradient);
    color: white;
}

.clear-semester-btn {
    background: var(--secondary-gradient);
    color: white;
}

.complete-semester-btn:hover:not(:disabled),
.clear-semester-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.complete-semester-btn:active:not(:disabled),
.clear-semester-btn:active:not(:disabled) {
    transform: translateY(0);
}

.complete-semester-btn:disabled,
.clear-semester-btn:disabled {
    background: rgba(128, 128, 128, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.semester-number {
    background: var(--secondary-gradient);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.subject-list {
    list-style: none;
}

.subject-item {
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
    position: relative;
    font-size: 0.9rem;
}

.subject-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #4facfe;
    transform: translateX(5px);
}

.subject-item.aprobado {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    font-weight: 600;
    border-left-color: #2e7d32;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.subject-item.aprobado:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateX(5px) scale(1.02);
}

.subject-item.convalidado {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #f0f9ff;
    font-weight: 600;
    border-left-color: #0369a1;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.subject-item.convalidado:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateX(5px) scale(1.02);
    color: #ffffff;
}

/* Nuevo estilo para ramos bloqueados */
.subject-item.bloqueado {
    background: rgba(128, 128, 128, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    opacity: 0.6;
    border-left-color: #666;
}

.subject-item.bloqueado:hover {
    background: rgba(128, 128, 128, 0.3);
    transform: none;
    border-left-color: #666;
}

.subject-item.bloqueado .subject-code {
    opacity: 0.4;
}

/* Nuevo estilo para ramos disponibles */
.subject-item.disponible {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-left-color: #4facfe;
    animation: disponible-pulse 2s ease-in-out infinite;
}

@keyframes disponible-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(79, 172, 254, 0); }
}

.subject-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 4px;
}

/* Tooltip para prerrequisitos */
.prerequisite-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 200px;
    white-space: normal;
}

.prerequisite-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.subject-item.bloqueado:hover .prerequisite-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Stats Section */
.stats-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
    color: var(--text-light);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Botón de reset */
.reset-button {
    background: var(--dark-gradient);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Toggle Switch para Convalidación */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px auto;
    padding: 20px;
}

.toggle-switch {
    position: relative;
    width: 280px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 30px;
}

.toggle-switch.active::before {
    opacity: 1;
}

.toggle-switch.active {
    border-color: rgba(79, 172, 254, 0.4);
    box-shadow: 
        0 12px 40px rgba(79, 172, 254, 0.3),
        0 0 0 1px rgba(79, 172, 254, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 130px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 25px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #334155;
    z-index: 2;
    position: relative;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-slider:hover::before {
    opacity: 1;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(140px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    color: #0369a1;
    box-shadow: 
        0 6px 20px rgba(79, 172, 254, 0.3),
        0 2px 8px rgba(79, 172, 254, 0.2);
}

.toggle-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.toggle-label-left, .toggle-label-right {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.4s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-label-left {
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.6;
    transform: translateX(10px);
}

.toggle-label-right {
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.6;
    transform: translateX(-10px);
}

.toggle-switch.active .toggle-label-left {
    opacity: 1;
    color: white;
    transform: translateX(0);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-label-right {
    opacity: 0.4;
    transform: translateX(-15px);
}

.toggle-switch:not(.active) .toggle-label-left {
    opacity: 0.4;
    transform: translateX(15px);
}

.toggle-switch:not(.active) .toggle-label-right {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(0);
}

/* Animación de pulso para el estado activo */
.toggle-switch.active {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 
            0 12px 40px rgba(79, 172, 254, 0.3),
            0 0 0 1px rgba(79, 172, 254, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 12px 40px rgba(79, 172, 254, 0.4),
            0 0 0 2px rgba(79, 172, 254, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Efectos de hover */
.toggle-switch:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.toggle-switch.active:hover {
    box-shadow: 
        0 15px 50px rgba(79, 172, 254, 0.4),
        0 0 0 2px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Iconos para el slider */
.toggle-slider-content {
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    position: relative;
}

.toggle-icon {
    font-size: 1rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: var(--dark-gradient);
    color: var(--text-light);
    padding: 40px 20px;
    text-align: center;
    width: 100%;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.footer-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.footer-description {
    opacity: 0.7;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
    border-color: #4facfe;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
    .curriculum-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .nav-container {
        max-width: 1000px;
    }
    
    .curriculum-section {
        max-width: 1000px;
    }
}

@media (max-width: 900px) {
    .curriculum-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .logo {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .nav-links {
        gap: 6px;
        justify-content: center;
        width: 100%;
    }
    
    .nav-button {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .curriculum-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-signature {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .curriculum-section {
        padding: 30px 20px 60px;
    }
    
    .hero {
        padding: 20px 20px 15px;
    }
    
    .nav-button {
        padding: 5px 8px;
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .semester-card {
        padding: 20px;
        min-height: 300px;
    }
    
    .semester-title {
        font-size: 1.2rem;
    }
    
    .subject-item {
        font-size: 0.85rem;
        padding: 10px;
    }
}