/* Modern Signup Page Styles - Cursor/Coursera Style */

.modern-signup-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

/* Multi-step form styles */
.signup-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.signup-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: #1E5CAA;
}

.btn-back svg {
    flex-shrink: 0;
}

/* Signup option buttons */
.btn-signup-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    font-family: inherit;
}

.btn-signup-option:hover {
    background: #fffff;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.btn-signup-option svg {
    flex-shrink: 0;
}

.btn-email-signup {
    background: linear-gradient(135deg, #1E5CAA 0%, #2563eb 100%);
    color: white;
    border-color: transparent;
}

.btn-email-signup:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1E5CAA 100%);
    color: white;
    box-shadow: 0 4px 12px -2px rgba(30, 92, 170, 0.4);
}

.modern-signup-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(30, 92, 170, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated Background Elements */
.signup-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.signup-svg-blob {
    position: absolute;
    opacity: 0.6;
    filter: blur(60px);
    animation: floatBlob 20s infinite ease-in-out;
}

.signup-svg-blob-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(30, 92, 170, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation-delay: 0s;
}

.signup-svg-blob-2 {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation-delay: -5s;
}

.signup-svg-blob-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation-delay: -10s;
}

.signup-svg-blob-4 {
    width: 350px;
    height: 350px;
    top: 20%;
    right: 10%;
    background: radial-gradient(circle, rgba(30, 92, 170, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation-delay: -7s;
}

.signup-svg-blob-5 {
    width: 450px;
    height: 450px;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation-delay: -12s;
}

@keyframes floatBlob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Background M Logo */
.signup-bg-m {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    background-image: url('/svg-m-logo-01.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: floatM 15s infinite ease-in-out;
    overflow: visible;
}

@keyframes floatM {
    0%, 100% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-50%) translateX(-20px) scale(1.05);
        opacity: 0.2;
    }
}

.signup-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.signup-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    min-height: 600px;
}

/* Left Content */
.signup-content {
    background: linear-gradient(135deg, #1E5CAA 0%, #2563eb 100%);
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.signup-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.signup-content-inner {
    position: relative;
    z-index: 1;
    color: white;
}

.signup-heading {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.signup-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

.signup-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.signup-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.95);
}

.signup-feature-item svg {
    flex-shrink: 0;
    color: white;
    stroke-width: 2.5;
}

/* Right Form */
.signup-form-container {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signup-form-card {
    width: 100%;
    max-width: 420px;
}

.signup-form-title {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-align: center;
}

.signup-form-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 2rem;
}

.modern-signup-form {
    width: 100%;
}

/* Google Signup Button */
.btn-google-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-google-signup:hover {
    background: #fffff;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.btn-google-signup svg {
    flex-shrink: 0;
}

/* Divider */
.signup-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.875rem;
}

.signup-divider::before,
.signup-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.signup-divider span {
    padding: 0 1rem;
    background: white;
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-input-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: #1e293b;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input-modern:focus {
    outline: none;
    border-color: #1E5CAA;
    box-shadow: 0 0 0 3px rgba(30, 92, 170, 0.1);
}

.form-input-modern::placeholder {
    color: #94a3b8;
}

/* Checkbox */
.form-check-modern {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-checkbox-modern {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #1E5CAA;
}

.form-check-label-modern {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    cursor: pointer;
}

.link-modern {
    color: #1E5CAA;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link-modern:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Error Messages */
.error-message-modern {
    font-size: 0.8125rem;
    color: #ef4444;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

/* Primary Signup Button */
.btn-signup-primary {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #1E5CAA 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(30, 92, 170, 0.3);
}

.btn-signup-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(30, 92, 170, 0.4);
}

.btn-signup-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-signup-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-signup-primary svg {
    flex-shrink: 0;
}

/* Footer Text */
.signup-footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .signup-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .signup-content {
        padding: 3rem 2rem;
        border-radius: 0;
    }

    .signup-heading {
        font-size: 2rem;
    }

    .signup-form-container {
        padding: 2.5rem 2rem;
    }

    .signup-bg-m {
        width: 300px;
        height: 300px;
        right: -50px;
        opacity: 0.1;
    }

    .signup-svg-blob-1,
    .signup-svg-blob-2,
    .signup-svg-blob-3,
    .signup-svg-blob-4,
    .signup-svg-blob-5 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 640px) {
    .modern-signup-section {
        padding: 1rem;
    }

    .signup-wrapper {
        border-radius: 1rem;
        min-height: auto;
    }

    .signup-content {
        padding: 2.5rem 1.5rem;
    }

    .signup-heading {
        font-size: 1.75rem;
    }

    .signup-subtitle {
        font-size: 1rem;
    }

    .signup-form-container {
        padding: 2rem 1.5rem;
    }

    .signup-form-title {
        font-size: 1.5rem;
    }

    .signup-bg-m {
        width: 200px;
        height: 200px;
        right: -80px;
        opacity: 0.08;
    }

    .signup-svg-blob-1,
    .signup-svg-blob-2,
    .signup-svg-blob-3,
    .signup-svg-blob-4,
    .signup-svg-blob-5 {
        width: 200px;
        height: 200px;
    }
}

/* ReCAPTCHA Styling */
.g-recaptcha {
    margin-bottom: 1rem;
}

.g-recaptcha > div {
    margin: 0 auto;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signup-form-card {
    animation: fadeInUp 0.6s ease-out;
}

.signup-content-inner {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   REGION-SPECIFIC STYLING (PK/UK)
   ============================================ */

/* Pakistan Region Branding */
.region-pk .signup-content {
    background: linear-gradient(135deg, #01411C 0%, #016837 100%);
}

.region-pk .signup-heading::after {
    content: ' 🇵🇰';
    font-size: 0.8em;
}

.region-pk .btn-email-signup,
.region-pk .btn-signup-primary {
    background: linear-gradient(135deg, #01411C 0%, #016837 100%);
}

.region-pk .btn-email-signup:hover,
.region-pk .btn-signup-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #013015 0%, #014D29 100%);
}

.region-pk .form-input-modern:focus {
    border-color: #01411C;
    box-shadow: 0 0 0 3px rgba(1, 65, 28, 0.1);
}

.region-pk .link-modern {
    color: #01411C;
}

.region-pk .link-modern:hover {
    color: #016837;
}

.region-pk .form-checkbox-modern {
    accent-color: #01411C;
}

.region-pk .btn-back:hover {
    color: #01411C;
}

.region-pk .signup-svg-blob-1,
.region-pk .signup-svg-blob-2 {
    background: radial-gradient(circle, rgba(1, 65, 28, 0.15) 0%, transparent 70%);
}

.region-pk .signup-svg-blob-3,
.region-pk .signup-svg-blob-4,
.region-pk .signup-svg-blob-5 {
    background: radial-gradient(circle, rgba(1, 104, 55, 0.12) 0%, transparent 70%);
}

/* UK Region Branding (Default Blue) */
.region-uk .signup-content {
    background: linear-gradient(135deg, #1E5CAA 0%, #2563eb 100%);
}

.region-uk .signup-heading::after {
    content: ' 🇬🇧';
    font-size: 0.8em;
}

/* ============================================
   ENHANCED UI IMPROVEMENTS
   ============================================ */

/* Glassmorphism effect for cards */
.signup-form-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Enhanced hover states */
.btn-signup-option {
    position: relative;
    overflow: hidden;
}

.btn-signup-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(30, 92, 170, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-signup-option:hover::before {
    width: 300px;
    height: 300px;
}

/* Improved input focus states */
.form-input-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input-modern:focus {
    transform: translateY(-2px);
}

/* Enhanced loading states */
.btn-signup-primary:disabled {
    position: relative;
}

.btn-signup-primary:disabled::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Enhanced success checkmark animation */
.success-icon-circle {
    position: relative;
}

.success-icon-circle::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Smooth page transitions */
@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modern-signup-section {
    animation: fadeInPage 0.4s ease-out;
}

/* Enhanced form validation styles */
.form-input-modern.is-invalid {
    border-color: #ef4444;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-input-modern.is-valid {
    border-color: #10b981;
}

.form-input-modern.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .modern-signup-section {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .signup-form-card {
        background: rgba(30, 41, 59, 0.95);
        backdrop-filter: blur(20px);
    }
    
    .signup-form-title {
        color: #f1f5f9;
    }
    
    .signup-form-subtitle,
    .form-label-modern {
        color: #cbd5e1;
    }
    
    .form-input-modern {
        background: #1e293b;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .form-input-modern:focus {
        background: #0f172a;
    }
    
    .btn-signup-option {
        background: #1e293b;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .btn-signup-option:hover {
        background: #334155;
    }
}

/* Print styles */
@media print {
    .signup-bg-elements,
    .signup-bg-m,
    .btn-back {
        display: none !important;
    }
    
    .modern-signup-section {
        background: white;
    }
}

/* Accessibility improvements */
.form-input-modern:focus-visible,
.btn-signup-option:focus-visible,
.btn-signup-primary:focus-visible {
    outline: 3px solid #1E5CAA;
    outline-offset: 2px;
}

.region-pk .form-input-modern:focus-visible,
.region-pk .btn-signup-option:focus-visible,
.region-pk .btn-signup-primary:focus-visible {
    outline-color: #01411C;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input-modern {
        border-width: 2px;
    }
    
    .btn-signup-option,
    .btn-signup-primary {
        border: 2px solid currentColor;
    }
}

