* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #581c87 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.header {
    background: linear-gradient(135deg, #1e3a8a, #3730a3);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(100px); }
}

.logo {
    position: relative;
    z-index: 2;
}

.logo h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

.form-container {
    padding: 40px;
}

.progress-bar {
    background: #f1f5f9;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3730a3, #581c87);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.step-description {
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.required::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
}

input, select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: #3730a3;
    box-shadow: 0 0 0 3px rgba(55, 48, 163, 0.1);
    transform: translateY(-2px);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    pointer-events: none;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-meter {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 4px 0;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-weak { background: #ef4444; }
.strength-medium { background: #f59e0b; }
.strength-strong { background: #10b981; }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #3730a3;
}

.checkbox-group label {
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 0;
    font-weight: 500;
}

.checkbox-group a {
    color: #3730a3;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #3730a3, #581c87);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(55, 48, 163, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    margin-right: 16px;
}

.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.form-group.error input,
.form-group.error select {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); /* subtle glow */
    transition: all 0.3s ease;
}


.form-group.error .error {
    border-color: #ff4444;
    background-color: #fff5f5;
}


.form-group.success input {
    border-color: #10b981;
    background: #f0fdf4;
}

.security-features {
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    margin: 30px 0;
}

.security-features h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.security-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.security-features li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    font-size: 16px;
}

.account-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.account-type {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.account-type:hover {
    border-color: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(55, 48, 163, 0.1);
}

.account-type.selected {
    border-color: #3730a3;
    background: #f8fafc;
}

.account-type input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.account-type h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.account-type p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.account-type .features {
    list-style: none;
}

.account-type .features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    margin-bottom: 6px;
}

.account-type .features li::before {
    content: '•';
    color: #3730a3;
    font-weight: bold;
}






.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}


.success-message::before {
    content: "✓";
    font-weight: bold;
    font-size: 18px;
}





/* ENHANCED: Better error styling */
.form-group.error .account-types {
    border: 2px solid #ef4444;
    border-radius: 16px;
    padding: 8px;
}

.success-message.show {
    display: flex;
}



.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-secondary {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .account-types {
        grid-template-columns: 1fr;
    }
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
}


/* Add these styles to your existing CSS */

/* Account Type Error Styling */
#accountTypeGroup.error .account-types {
    border: 2px solid #ef4444;
    border-radius: 16px;
    padding: 8px;
}

#accountTypeGroup.error #accountTypeError {
    display: block;
    margin-top: 10px;
}

/* Success Message Styling */
.success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.success-message::before {
    content: "✓";
    font-weight: bold;
    font-size: 18px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Selected Account Type */
.account-type.selected {
    border-color: #3730a3;
    background-color: #f8fafc;
    box-shadow: 0 0 0 2px #3730a3;
}



input.error, select.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

input.error:focus, select.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}