/* ============================================
   REGISTER.CSS - Pagina de Registro
   FlowTrading Global
============================================ */

/* ============================================
   IMPORTS - Estilos base y layout
============================================ */
@import url('../main.css');
@import url('../layout.css');
@import url('../components.css');

/* ============================================
   LIGHT MODE OVERRIDES
============================================ */
body.light-mode .register-card {
    background: #ffffff;
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .logo-section p {
    color: #666666;
}

body.light-mode .form-group label {
    color: #1a1a1a;
}

body.light-mode .form-group input,
body.light-mode .form-group select {
    background: #f8f8f8;
    border-color: #e0e0e0;
    color: #1a1a1a;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group select:focus {
    background: #ffffff;
    border-color: #d4af37;
}

body.light-mode .form-group input::placeholder {
    color: #999999;
}

body.light-mode .form-group small {
    color: #666666;
}

body.light-mode .toggle-password {
    color: #888888;
}

body.light-mode .password-strength {
    background: #e0e0e0;
}

body.light-mode .terms {
    color: #333333;
}

body.light-mode .register-container .divider {
    color: #888888;
}

body.light-mode .register-container .divider::before,
body.light-mode .register-container .divider::after {
    background: #e0e0e0;
}

body.light-mode .login-link {
    color: #666666;
}

body.light-mode .back-home {
    color: #888888;
}

/* ============================================
   REGISTER PAGE
============================================ */
.register-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: calc(var(--ticker-height) + var(--header-height) + 60px) 20px 60px;
}

.register-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    /* Fallback color sólido */
    color: #d4af37;
    /* Gradiente con prefijos */
    background: -webkit-linear-gradient(135deg, #d4af37, #ffd700);
    background: -moz-linear-gradient(135deg, #d4af37, #ffd700);
    background: -o-linear-gradient(135deg, #d4af37, #ffd700);
    background: linear-gradient(135deg, #d4af37, #ffd700);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}

.logo-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input.error {
    border-color: #dc3545;
}

.form-group input.valid {
    border-color: #28a745;
}

.form-group small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 5px;
}

.form-group small.error-text {
    color: #ff6b6b;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
}

.toggle-password:hover {
    color: #d4af37;
}

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
}

.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #dc3545;
}
.password-strength-bar.medium {
    width: 66%;
    background: #ffc107;
}
.password-strength-bar.strong {
    width: 100%;
    background: #28a745;
}

.terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.terms input {
    accent-color: #d4af37;
    margin-top: 3px;
}

.terms a {
    color: #d4af37;
    text-decoration: none;
}

.btn-register {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

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

.register-container .divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    height: auto;
    background: transparent;
}

.register-container .divider::before,
.register-container .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.register-container .divider span {
    padding: 0 15px;
}

.login-link {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.login-link a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    color: #ffd700;
}

.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

.error-message.show,
.success-message.show {
    display: block;
}

.back-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
}

.back-home:hover {
    color: #d4af37;
}

/* Loading spinner */
.btn-register .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.btn-register.loading .spinner {
    display: inline-block;
}

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

@media (max-width: 768px) {
    .register-container {
        max-width: min(480px, calc(100% - 2rem));
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .register-container {
        max-width: 100%;
        padding: calc(var(--ticker-height) + var(--header-height) + 40px) 1rem 40px;
    }

    .register-card {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .logo-section h1 {
        font-size: 24px;
    }

    .logo-section p {
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btn-register {
        padding: 12px;
        font-size: 0.95rem;
    }
}
