/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Contenedor principal */
.login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    max-width: 1400px;
    width: 100%;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header y logo */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title {
    color: #333;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sección principal de selección */
.main-selection {
    margin-bottom: 50px;
}

.user-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.user-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 3px solid transparent;
    overflow: hidden;
    position: relative;
}

.user-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.user-card.student-card {
    border-color: #4ecdc4;
}

.user-card.teacher-card {
    border-color: #ff6b6b;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-card.teacher-card::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.user-card:hover::before {
    opacity: 1;
}

/* Header de las cards */
.card-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.student-card .card-header {
    background: linear-gradient(135deg, #e8f8f5, #d1f2eb);
}

.teacher-card .card-header {
    background: linear-gradient(135deg, #ffeaea, #ffd6d6);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.student-card .card-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.teacher-card .card-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.card-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Contenido de las cards */
.card-content {
    padding: 30px;
}

.features-list {
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.feature-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.feature-item i {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.1rem;
    color: #667eea;
}

.student-card .feature-item i {
    color: #4ecdc4;
}

.teacher-card .feature-item i {
    color: #ff6b6b;
}

.feature-item span {
    font-weight: 500;
    color: #555;
}

/* Preview de actividades */
.activities-preview, .dashboard-preview {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.activities-preview h4, .dashboard-preview h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.activity-tags, .dashboard-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.activity-tag, .dashboard-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.student-card .activity-tag {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.3);
}

.teacher-card .dashboard-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

/* Footer de las cards */
.card-footer {
    padding: 0 30px 30px;
}

.select-role-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.student-card .select-role-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.teacher-card .select-role-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.select-role-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.student-card .select-role-btn:hover {
    box-shadow: 0 12px 35px rgba(78, 205, 196, 0.4);
}

.teacher-card .select-role-btn:hover {
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

/* Sección del formulario de login */
.login-form-section {
    margin-bottom: 50px;
}

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

.form-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #666;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.back-btn:hover {
    background: #e9ecef;
    color: #333;
    transform: translateX(-3px);
}

.form-header h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-group label i {
    color: #667eea;
    width: 20px;
}

.form-group input {
    padding: 18px 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sección de información */
.info-section {
    margin-bottom: 40px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 800px;
    margin: 0 auto;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.info-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

.info-card h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* Credenciales de Demo */
.demo-credentials {
    margin-bottom: 40px;
}

.demo-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    max-width: 600px;
    margin: 0 auto;
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    text-align: center;
    justify-content: center;
}

.demo-header i {
    font-size: 1.8rem;
    color: #667eea;
}

.demo-header h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.demo-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.credential-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.credential-role {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.credential-role i {
    font-size: 1.3rem;
    color: #667eea;
}

.credential-role span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.credential-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credential-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1rem;
}

.credential-field strong {
    color: #495057;
    min-width: 80px;
}

.credential-field:not(strong) {
    color: #667eea;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

/* Acceso directo */
.direct-access {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px dashed #e9ecef;
}

.direct-access p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.main-page-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.main-page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 20px;
        margin: 10px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .user-type-cards {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .user-card {
        margin: 0 10px;
    }
    
    .card-header {
        padding: 30px 20px 15px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-footer {
        padding: 0 20px 20px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .back-btn {
        position: relative;
        margin-bottom: 20px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .activity-tags, .dashboard-features {
        justify-content: center;
    }
    
    .demo-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .demo-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .demo-header h3 {
        font-size: 1.3rem;
    }
    
    .credential-item {
        padding: 15px;
    }
    
    .credential-role {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .credential-details {
        gap: 6px;
    }
    
    .credential-field {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .credential-field strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .select-role-btn, .login-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
}

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

.user-card {
    animation: fadeInUp 0.6s ease-out;
}

.user-card:nth-child(1) { animation-delay: 0.1s; }
.user-card:nth-child(2) { animation-delay: 0.2s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-form-section {
    animation: slideInRight 0.5s ease-out;
}

/* Estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "Cargando...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-weight: bold;
}