/* =====================================================
   REGISTER PAGE - Modern Blue Theme
   Fully updated with all styles consolidated
   ===================================================== */

/* Background Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.register-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 30%, #6366f1 60%, #8b5cf6 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

/* Floating Circles */
.register-container::before,
.register-container::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.register-container::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation: float 20s ease-in-out infinite;
}

.register-container::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-5deg); }
    75% { transform: translate(15px, 5px) rotate(3deg); }
}

/* Card */
.register-card {
    background: #ffffff;
    max-width: 480px;
    width: 100%;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.register-header {
    text-align: center;
    margin-bottom: 32px;
}

.register-header h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.register-header p {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
    color: #991b1b;
}

.alert-error::before {
    content: '⚠️';
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    color: #065f46;
}

.alert-success::before {
    content: '✓';
}

/* =====================================================
   FORMS
   ===================================================== */

.register-form,
.otp-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 8px;
}

.country-code-select {
    min-width: 130px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.country-code-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.phone-number-input,
.form-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.phone-number-input:focus,
.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* =====================================================
   OTP INPUTS
   ===================================================== */

.otp-label {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.otp-input {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
}

.otp-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateX(-4px);
}

/* =====================================================
   RECAPTCHA CONTAINER
   ===================================================== */

#recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

/* =====================================================
   FOOTER
   ===================================================== */

.form-footer {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

.link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* =====================================================
   LOADING SPINNER (for button states)
   ===================================================== */

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.otp-form {
    animation: fadeIn 0.4s ease;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .register-container {
        padding: 24px 16px;
    }

    .register-card {
        padding: 40px 32px;
    }

    .register-header h2 {
        font-size: 28px;
    }

    .otp-inputs {
        gap: 12px;
    }

    .otp-input {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: 16px 12px;
    }

    .register-card {
        padding: 32px 24px;
    }

    .register-header h2 {
        font-size: 24px;
    }

    .register-header p {
        font-size: 14px;
    }

    .phone-input {
        flex-direction: column;
    }

    .country-code-select {
        min-width: 100%;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .form-footer {
        font-size: 13px;
    }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .otp-input {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .register-container::before,
    .register-container::after,
    .btn,
    #recaptcha-container,
    .form-footer {
        display: none !important;
    }

    .register-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    body {
        background: #ffffff;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.hidden {
    display: none !important;
}

/* =====================================================
   END OF REGISTER CSS
   ===================================================== */