:root {
    --primary: #8936F3;
    --secondary: #29EED8;
    --hyperlink: #315ef6;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-container {
    display: flex;
    min-height: 100vh;
}

/* Brand Section (Left Side) */
.brand-section {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

.brand-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0.5;
}

.brand-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(41, 238, 216, 0.15) 0%, transparent 70%);
    opacity: 0.5;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 3rem;
}

.brand-message {
    margin-bottom: 3rem;
}

.brand-message h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.brand-message p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.9375rem;
    opacity: 0.85;
    line-height: 1.5;
}

/* Form Section (Right Side) */
.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: white;
}

.form-container {
    width: 100%;
    max-width: 480px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1rem;
    color: var(--text-gray);
}

/* Form Styles */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(138, 39, 247, 0.1);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Password Requirements */
.password-requirements {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.875rem;
}

.password-requirements p {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.password-requirements li {
    color: var(--text-gray);
    padding-left: 1.5rem;
    position: relative;
}

.password-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--text-gray);
    font-weight: bold;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid::before {
    color: #10b981;
}

/* Checkbox */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-text {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Submit Button */
.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(137, 54, 243, 0.3);
    background: #7a2edb;
}

.submit-btn:active {
    transform: translateY(0);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Terms Text */
.terms-text {
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.terms-text a {
    color: var(--hyperlink);
    text-decoration: none;
    font-weight: 500;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Footer */
.footer-text {
    margin-top: 2rem;
    text-align: left;
    color: var(--text-gray);
    font-size: 0.9375rem;
}

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

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

/* Error Messages */
label.error {
    color: #ef4444;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: block;
    width: 100%;
}

input.error,
select.error {
    border-color: #ef4444 !important;
}

/* Ensure password error appears below the password wrapper */
.password-wrapper + label.error {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

/* Ensure checkbox error appears below the checkbox label */
.checkbox-label + label.error {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    margin-left: 0;
}

/* Alert/Toaster Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
}

.alert-danger {
    background-color: #fee2e2;
    border: 2px solid #ef4444;
    color: #dc2626;
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    .brand-section {
        clip-path: none;
        padding: 2rem;
        min-height: 400px;
    }

    .brand-message h1 {
        font-size: 2rem;
    }

    .features {
        gap: 1.5rem;
    }

    .form-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .brand-section {
        padding: 2rem 1.5rem;
        min-height: 350px;
    }

    .brand-message h1 {
        font-size: 1.75rem;
    }

    .brand-message p {
        font-size: 1rem;
    }

    .features {
        gap: 1.25rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }

    .form-section {
        padding: 2rem 1rem;
    }
}
