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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #4b91a2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Fondo animado con símbolos matemáticos */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.math-symbol {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    animation: float 6s ease-in-out infinite;
}

.math-symbol:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.math-symbol:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; }
.math-symbol:nth-child(3) { top: 60%; left: 5%; animation-delay: 2s; }
.math-symbol:nth-child(4) { top: 70%; right: 10%; animation-delay: 3s; }
.math-symbol:nth-child(5) { top: 40%; left: 20%; animation-delay: 4s; }
.math-symbol:nth-child(6) { top: 30%; right: 25%; animation-delay: 5s; }
.math-symbol:nth-child(7) { top: 80%; left: 15%; animation-delay: 6s; }
.math-symbol:nth-child(8) { top: 15%; left: 50%; animation-delay: 7s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Contenedor principal */
.registro-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 950px;
    position: relative;
    z-index: 10;
    animation: slideIn 0.8s ease-out;
    margin: 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del registro */
.registro-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

.registro-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #4b95a2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Selector de rol */
.rol-selector {
    display: flex;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.rol-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    background: transparent;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.rol-btn.activo {
    background: linear-gradient(135deg, #5b7edf 0%, #3e5bbd 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(106, 90, 255, 0.418);
    transform: translateY(-2px);
}

.rol-btn:hover:not(.activo) {
    background: rgba(107, 142, 255, 0.192);
    color: #6bc9ff;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-header h2 i {
    color: #6b75ff;
    font-size: 1.5rem;
}

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

.grid-campos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 0 20px;
    transition: all 0.3s ease;
    height: 60px;
}

.input-field:focus-within {
    border-color: #6b9aff;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.input-field i {
    color: #6b75ff;
    font-size: 1.1rem;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.input-field:focus-within i {
    color: #5269ee;
    transform: scale(1.1);
}

.input-field input,
.input-field select {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
    outline: none;
    font-weight: 500;
}

.input-field input::placeholder {
    color: #999;
    font-weight: 400;
}

.input-field select {
    cursor: pointer;
    color: #333;
}

.input-field select option {
    color: #333;
    background: white;
}

/* Checkbox y términos */
.checkbox-group {
    margin: 2rem 0;
    text-align: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label input[type="checkbox"] + span {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + span {
    background: #866bff;
    border-color: #6b9aff;
}

.checkbox-label input[type="checkbox"]:checked + span::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.link-rojo {
    color: #6b7aff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link-rojo:hover {
    color: #5552ee;
    text-decoration: underline;
}

/* Botón de envío */
.submit-btn {
    width: 100%;
    height: 65px;
    background: linear-gradient(135deg, #6b9fff 0%, #6252ee 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(107, 129, 255, 0.356);
    margin-bottom: 2rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(107, 196, 255, 0.432);
}

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

.btn-docente {
    background: linear-gradient(135deg, #4e70cd 0%, #4461a0 100%);
    box-shadow: 0 10px 30px rgba(78, 112, 205, 0.3);
}

.btn-docente:hover {
    box-shadow: 0 15px 40px rgba(78, 91, 205, 0.4);
}

/* Footer del formulario */
.form-footer {
    text-align: center;
    border-top: 2px solid #f0f0f0;
    padding-top: 1.5rem;
}

.form-footer p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.form-footer a {
    color: #6b81ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: #5276ee;
    text-decoration: underline;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 12px 25px;
    background: rgba(107, 117, 255, 0.1);
    border-radius: 25px;
    color: #6b8eff !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home:hover {
    background: rgba(107, 154, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

/* Clase para ocultar formularios */
.oculto {
    display: none;
}

/* Animación de entrada suave */
.registro-form {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .registro-container {
        max-width: 90%;
        padding: 2rem;
    }
    
    .grid-campos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .registro-container {
        margin: 10px;
        padding: 1.5rem;
    }
    
    .registro-header h1 {
        font-size: 2rem;
    }
    
    .grid-campos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rol-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .input-field {
        height: 55px;
    }
    
    .submit-btn {
        height: 60px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .registro-container {
        padding: 1rem;
    }
    
    .registro-header h1 {
        font-size: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.4rem;
    }
    
    .rol-selector {
        flex-direction: column;
        gap: 5px;
    }
    
    .rol-btn {
        border-radius: 10px;
    }
}