:root {
    --bg-dark: #121212;
    --panel-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --primary-red: #cc0000;
    --primary-red-hover: #e60000;
    --input-bg: #eef2f6;
    --input-text: #333333;
    --input-icon: #777777;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    /* Adding a subtle dark radial gradient like the original image */
    background: radial-gradient(circle at 30% 50%, #2a1111 0%, #121212 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.form-container {
    background-color: var(--panel-bg);
    width: 100%;
    max-width: 662px;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    transition: max-width 0.3s ease;
    display: block !important;
}

.logo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    text-align: center;
}

/* Step Layouts */
.step-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.step-section.active {
    display: block;
}

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

/* Make step 3 and 4 wider */
#step-3-garage-info, #step-4-kyc {
    /* If we want to make the parent wider we handle it via JS, but for now CSS approach:
       We keep max width of form-container to 900px when active */
}

.form-container:has(#step-3-garage-info.active),
.form-container:has(#step-4-kyc.active) {
    max-width: 900px;
}



.logo-box {
    background-color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px; /* Adjust according to preference */
}

.main-logo {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

/* Typography */
.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.subsection-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 15px;
    color: #fff;
}

/* Social & Toggles */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-social {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #2a2a2a;
    border: 1px solid #333;
    color: white;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-social:hover {
    background-color: #333;
}

.account-type-toggle {
    display: flex;
    background-color: #2a2a2a;
    border-radius: 30px;
    padding: 5px;
    margin-bottom: 25px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.toggle-btn.active {
    background-color: var(--primary-red);
    color: white;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #333;
}

.divider span {
    padding: 0 10px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .input-group {
    flex: 1;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.input-wrapper .icon {
    position: absolute;
    left: 15px;
    color: var(--input-icon);
    font-size: 16px;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    color: var(--input-text);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.input-wrapper .prefix-code {
    position: absolute;
    left: 45px;
    color: var(--input-text);
    font-weight: 600;
    font-size: 14px;
    user-select: none;
    pointer-events: none;
}

/* Provide padding if there is a left icon */
.input-wrapper:has(.icon) input {
    padding-left: 45px;
}

/* Provide more padding if there is both an icon and a prefix */
.input-wrapper:has(.prefix-code) input {
    padding-left: 90px;
}

/* For password toggle right icon */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--input-icon);
    cursor: pointer;
    font-size: 16px;
}

.input-wrapper select {
    appearance: none;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 15px;
    color: var(--input-icon);
    pointer-events: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2);
}

.input-wrapper input::placeholder {
    color: #999;
}

/* Checkboxes and Radios */
.form-options {
    margin-top: 5px;
    margin-bottom: 10px;
}

.checkbox-container, .radio-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container a {
    color: var(--primary-red);
    text-decoration: none;
}

.checkbox-container input, .radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark, .radiomark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    transition: var(--transition);
}

.radio-container .radiomark {
    border-radius: 50%;
}

.checkbox-container:hover input ~ .checkmark,
.radio-container:hover input ~ .radiomark {
    border-color: var(--primary-red);
}

.checkbox-container input:checked ~ .checkmark,
.radio-container input:checked ~ .radiomark {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.checkmark:after, .radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after,
.radio-container input:checked ~ .radiomark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-container .radiomark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Action Buttons */
.btn-primary {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.action-buttons .btn-primary {
    margin-top: 10px;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid #444;
    padding: 14px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
}

.btn-secondary:hover {
    background-color: #2a2a2a;
}

/* Footer Links */
.form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.forgot-password {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.forgot-password:hover {
    color: white;
}

.switch-mode {
    color: var(--text-secondary);
    font-size: 14px;
}

.switch-mode a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.switch-mode a:hover {
    text-decoration: underline;
}

/* Upload Area */
.upload-row {
    margin-bottom: 20px;
}

.upload-group {
    flex: 1;
}

.upload-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.upload-area {
    background-color: #2a2a2a;
    border: 2px dashed #444;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-red);
    background-color: #333;
}

.upload-icon {
    font-size: 24px;
    color: #888;
    margin-bottom: 15px;
}

.upload-area p {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.upload-area .highlight {
    color: var(--primary-red);
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.credit-toggle-wrapper {
    margin: 25px 0 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

/* OTP Section */
.otp-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    width: 100%;
}

.otp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.otp-container .action-buttons {
    width: 100%;
    justify-content: center;
}

.otp-box {
    width: 50px;
    height: 60px;
    font-size: 20px;
    text-align: center;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

.otp-box:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--panel-bg);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 10px;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.canvas-wrapper {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 10px;
    margin-bottom: 20px;
}

canvas {
    border: 1px dashed #ccc;
    background-color: #fafafa;
    border-radius: 4px;
    cursor: crosshair;
    width: 100%;
    display: block;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-container:has(#step-3-garage-info.active),
    .form-container:has(#step-4-kyc.active) {
        max-width: 100%;
    }
    
    .form-container {
        padding: 20px;
    }
}

.error-input {
    border-color: var(--primary-red) !important;
}

.custom-error {
    color: var(--primary-red);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.new-input-hidden {
    display: none;
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    color: var(--input-text);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.new-input-hidden:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2);
}
