/* register-styles.css */

/* ===== VARIABLES ===== */
:root {
    --primary-color: #7C3AED;
    --primary-light: #8B5CF6;
    --primary-dark: #6D28D9;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --text-dark: #111827;
    --text-medium: #374151;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LAYOUT ===== */
.register-page {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    display: grid;
    grid-template-columns: 450px 1fr;
    max-width: 1400px;
    width: 100%;
    height: 95vh;
    max-height: 1000px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.5s ease;
}

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

/* ===== SIDEBAR ===== */
.register-sidebar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    padding-right: 5px;
}

/* Custom scrollbar para sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(to right, #fff, #FBBF24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Badge de prueba */
.trial-badge {
    background: linear-gradient(135deg, var(--secondary-color), #34D399);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.trial-badge i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.trial-badge span {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.trial-badge small {
    font-size: 0.85rem;
    opacity: 0.9;
}

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

/* Elementos artísticos */
.artistic-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.element {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.element-1 { top: 15%; left: 10%; animation-delay: 0s; }
.element-2 { top: 65%; right: 10%; animation-delay: 2s; }
.element-3 { bottom: 15%; left: 15%; animation-delay: 4s; }

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

/* Tarjeta de precio */
.price-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.price-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.price-header i {
    font-size: 1.3rem;
    background: white;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.price-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0.5rem 0;
    line-height: 1;
}

.price-period {
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.price-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0.75rem 0;
    line-height: 1.4;
}

.price-features {
    margin: 1rem 0;
}

.price-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.price-feature i {
    color: var(--secondary-color);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.price-details {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
    line-height: 1.4;
}

/* Testimonial */
.testimonial {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
    flex-shrink: 0;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.testimonial .author {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== FORMULARIO ===== */
.register-form-container {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    overflow: hidden;
}

.form-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Custom scrollbar para formulario */
.form-wrapper::-webkit-scrollbar {
    width: 8px;
}

.form-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.form-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

.form-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.form-header {
    margin-bottom: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.form-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Alertas */
.alert-container {
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--danger-color);
}

.alert i {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Formulario */
.register-form {
    margin-bottom: 1.5rem;
}

.form-section {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.form-section:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header i {
    font-size: 1.3rem;
    color: var(--primary-color);
    background: white;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.section-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
}

/* Grid del formulario */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.form-grid.triple {
    grid-template-columns: repeat(3, 1fr);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.375rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.input-label i {
    font-size: 1rem;
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
    color: var(--text-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-helper {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Contenedor de contraseña */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Términos y condiciones */
.terms-container {
    max-height: 160px;
    overflow-y: auto;
    padding: 0.875rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.terms-content {
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.terms-content h4 {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin: 1rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.terms-content p {
    margin-bottom: 0.875rem;
}

.terms-content ul {
    margin: 0.5rem 0 0.875rem 1.25rem;
    padding: 0;
}

.terms-content li {
    margin-bottom: 0.375rem;
    font-size: 0.85rem;
}

/* Checkbox de términos */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.875rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.4;
    cursor: pointer;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.terms-link:hover {
    text-decoration: underline;
}

/* Botón de registro */
.btn-register {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 1.5rem 0 1rem;
    flex-shrink: 0;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-register:active {
    transform: translateY(0);
}

.btn-register.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-register.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enlaces */
.register-links {
    text-align: center;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.register-links p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.login-link:hover {
    gap: 8px;
    text-decoration: underline;
}

/* Información de seguridad */
.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.875rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    flex-shrink: 0;
}

.security-info i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Footer */
.register-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ===== MODALES ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 700px;
    max-height: 80vh;
    width: 100%;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    color: var(--text-medium);
    line-height: 1.5;
    font-size: 0.95rem;
}

.modal-body h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 0.875rem;
}

.modal-body ul {
    margin: 0.5rem 0 0.875rem 1.5rem;
}

.modal-body li {
    margin-bottom: 0.375rem;
}

/* ===== ANIMACIONES ===== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .register-container {
        grid-template-columns: 400px 1fr;
        height: 90vh;
    }
    
    .form-grid.triple {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .register-container {
        grid-template-columns: 1fr;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        margin: 0;
        width: 100%;
    }
    
    .register-sidebar {
        display: none;
    }
    
    .register-form-container {
        padding: 1.5rem;
    }
    
    .form-wrapper {
        max-width: 100%;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .register-page {
        padding: 10px;
    }
    
    .register-form-container {
        padding: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid.triple {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .section-header i {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 1.25rem;
    }
    
    .footer-links {
        gap: 0.75rem;
    }
    
    /* Mejorar experiencia táctil */
    input, select, textarea, button {
        font-size: 16px !important;
    }
    
    .form-input, .btn-register {
        min-height: 48px;
    }
    
    .checkbox-group label {
        font-size: 0.85rem;
    }
    
    .btn-register {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .btn-register {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .trial-badge {
        padding: 0.875rem;
    }
    
    .trial-badge span {
        font-size: 1rem;
    }
    
    .form-grid {
        gap: 0.75rem;
    }
    
    .input-group {
        margin-bottom: 0.75rem;
    }
}