:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --locked: #adb5bd;
    --card-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Animaciones */
@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    80% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-pop {
    animation: popIn 0.5s ease-out forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Estilos generales */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    background: var(--header-bg);
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.03)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
    opacity: 0.6;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.university-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    margin-top: 1rem;
}

.header-progress {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    position: relative;
    z-index: 2;
}

.progress-track {
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.6s ease, background 0.3s;
}

#global-progress-text {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Controles */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 2rem auto;
    max-width: 1200px;
}

.btn {
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(1px);
}

.btn-reset {
    background: var(--danger);
    color: white;
}

.btn-print {
    background: var(--warning);
    color: white;
}

/* Layout principal */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: start;
}

/* Semestres */
.semesters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.semester {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.semester:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.12);
}

.semester::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.semester-title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.semester-number {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Cursos */
.course {
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.3), rgba(255,255,255,0));
    transform: translateX(-100%);
    transition: transform 0.4s;
}

.course:hover::before {
    transform: translateX(100%);
}

.course.unlocked {
    background: rgba(67, 97, 238, 0.05);
    border-left: 4px solid var(--primary);
}

.course.locked {
    background: rgba(173, 181, 189, 0.1);
    border-left: 4px solid var(--locked);
    cursor: not-allowed;
}

.course.approved {
    background: rgba(76, 201, 240, 0.1);
    border-left: 4px solid var(--success);
}

.course-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.course.approved .course-name {
    text-decoration: line-through;
    color: var(--success);
}

.course-credits {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Columna de progreso */
.progress-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.chart-container {
    height: 200px;
    width: 100%;
    margin: 15px 0;
}

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

.stat {
    background: rgba(67, 97, 238, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.stat:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 5px 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tips card */
.tips-card {
    background: var(--primary);
    color: white;
}

.tips-card h3 {
    color: white;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-list i {
    color: rgba(255,255,255,0.8);
}

/* Botones flotantes */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-help {
    background: var(--danger);
}

.btn-scroll-top {
    background: var(--dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .progress-column {
        position: static;
        order: -1;
        margin-bottom: 30px;
    }
    
    .semesters-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
