/* Modern Split UI Light Mode Registration Styling - signup-split.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --signup-bg: #1e293b; /* Dark slate matching both signin and signup */
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155; /* Darker slate for better legibility */
    --text-muted: #64748b;
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: #e0e7ff;
    --color-success: #10b981;
    --color-success-light: #ecfdf5;
    --color-error: #ef4444;
    --color-error-light: #fef2f2;
    --border-color: #cbd5e1; /* Darker border for higher clarity */
    --border-focus: #4f46e5;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--signup-bg) !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    overflow-y: auto;
}

/* Split Layout */
.signup-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Panel - Branding & Information */
.signup-left {
    flex: 0.8; /* Reduced width */
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); 
    color: #ffffff;
    padding: 40px; /* Reduced padding from 60px */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.signup-left::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.brand-logo {
    font-size: 2rem; /* Reduced brand logo size */
    color: #818cf8;
    text-shadow: 0 0 15px rgba(129, 140, 248, 0.4);
}

.brand-name {
    font-size: 1.35rem; /* Reduced brand name size */
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.left-content {
    margin: auto 0;
    max-width: 520px;
    z-index: 2;
}

.left-title {
    font-size: 2.2rem; /* Reduced heading size from 2.6rem */
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.left-desc {
    font-size: 0.95rem; /* Reduced desc size */
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 30px; /* Reduced bottom margin */
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Reduced gap from 20px */
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px; /* Reduced gap */
}

.feature-icon {
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    width: 36px; /* Reduced icon size from 44px */
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #818cf8;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.feature-text h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem; /* Reduced heading size */
    font-weight: 700;
    color: #ffffff;
}

.feature-text p {
    margin: 0;
    font-size: 0.85rem; /* Reduced paragraph size */
    color: #cbd5e1;
}

.left-footer {
    font-size: 0.8rem;
    color: #94a3b8;
    z-index: 2;
}

/* Right Panel - Interactive Form */
.signup-right {
    flex: 1.2; 
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px; /* Reduced padding from 60px to 30px */
    position: relative;
}

.signup-container {
    width: 100%;
    max-width: 620px; 
    animation: fadeIn 0.4s ease;
    background: #ffffff; 
    padding: 30px 40px; /* Reduced padding from 45px 50px */
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure OTP stages are completely hidden unless active */
.signup-container.hidden-stage {
    display: none !important;
}

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

.form-header {
    margin-bottom: 20px; /* Reduced from 32px */
}

.form-header h2 {
    font-size: 1.8rem; /* Reduced header size from 2.2rem */
    font-weight: 800;
    margin: 0 0 4px 0;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.form-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem; /* Reduced from 0.95rem */
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; /* Reduced gap from 20px */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduced gap */
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.75rem; /* Reduced label size */
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px; /* Reduced padding from 12px 16px */
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem; /* Reduced font size from 0.95rem */
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: var(--border-focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Domain Group */
.domain-group {
    display: flex;
    align-items: center;
}

.domain-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.domain-suffix {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-left: none;
    padding: 10px 14px; /* Matches input padding */
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Username input container for icons */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    padding-right: 40px !important;
}

.username-icon {
    position: absolute;
    right: 12px;
    font-size: 0.95rem;
    display: none;
    pointer-events: none;
}

.username-icon.success {
    color: var(--color-success);
    display: inline-block;
}

.username-icon.error {
    color: var(--color-error);
    display: inline-block;
}

/* Referral Feedback Design */
.referral-container {
    position: relative;
}

.referral-status {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.form-control.valid-referral {
    border-color: var(--color-success) !important;
    background: var(--color-success-light) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
}

.form-control.invalid-referral {
    border-color: var(--color-error) !important;
    background: var(--color-error-light) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* Submit Button styling */
.btn-submit {
    width: 100%;
    background: var(--color-primary);
    border: none;
    border-radius: 10px;
    padding: 12px; /* Reduced padding from 14px */
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px; /* Reduced from 24px */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-submit:hover:not(:disabled) {
    background: var(--color-primary-hover);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.signup-footer {
    text-align: center;
    margin-top: 18px; /* Reduced from 28px */
    font-size: 0.88rem; /* Reduced size */
    color: var(--text-muted);
}

.signup-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.signup-footer a:hover {
    text-decoration: underline;
}

/* Stage Overrides for OTP details */
.stage-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.otp-panel {
    text-align: center;
    padding: 20px 0;
}

.otp-input {
    width: 100%;
    max-width: 220px;
    text-align: center;
    letter-spacing: 12px;
    font-size: 26px;
    font-weight: 800;
    margin: 20px 0;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.otp-input:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: none;
}

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

/* Hide surrounding AuthMasterPage wrappers if any conflict happens */
.auth-page {
    padding: 0 !important;
    background: #1e293b !important; /* Flat background, matching left side */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
}

.auth-container {
    max-width: 500px !important; /* Smaller size for signin box */
    width: 100% !important;
    padding: 20px !important;
}

.auth-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
    overflow: hidden;
}

.auth-header {
    background: none !important;
    padding: 30px 24px 10px !important;
}

.auth-header h1 {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

.auth-form {
    padding: 20px 30px 30px !important;
}

.footer {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .signup-left {
        display: none;
    }
    .signup-right {
        flex: 1;
        padding: 40px 20px;
    }
}
