:root {
    --primary: #e63946;
    --secondary: #1d3557;
    --light: #ffffff;
    --accent: #a8dadc;
    --dark: #457b9d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: var(--light);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.flame-icon {
    background-color: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin-bottom: 15px;
}

.logo h1 {
    color: var(--secondary);
    font-size: 28px;
    font-weight: 700;
}

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

.form-step {
    display: none;
}

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

h2 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 24px;
}

.subtext {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 14px;
}

.toggle-container {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--accent);
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background-color: var(--light);
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 14px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.error-message {
    color: var(--primary);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #d62839;
}

.btn-secondary {
    background-color: var(--light);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

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

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-group .btn-primary,
.btn-group .btn-secondary {
    flex: 1;
}
/* Enhanced Verification Code Inputs */
.code-inputs {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    gap: 10px;
}

.code-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: var(--secondary);
}

.code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
    transform: translateY(-2px);
}

.code-input.filled {
    border-color: var(--primary);
    background-color: rgba(230, 57, 70, 0.05);
}

.code-input.error {
    border-color: #ff4757;
    background-color: rgba(255, 71, 87, 0.05);
}

.resend-text {
    text-align: center;
    margin: 15px 0 25px;
    color: #666;
    font-size: 14px;
}

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

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

/* For smaller screens */
@media (max-width: 480px) {
    .code-input {
        width: 35px;
        height: 45px;
        font-size: 20px;
    }
}
.code-input {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.login-link {
    text-align: center;
    margin-top: 25px;
    color: #6c757d;
    font-size: 14px;
}

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

.login-link a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .container {
        padding: 30px 20px;
    }
    
    .code-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}

/* Enhanced loading animation */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: button-loading-spinner 0.8s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: translate(-50%, -50%) rotate(0turn);
    }
    to {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

/* Hide button text when loading */
.btn-loading span {
    visibility: hidden;
}

.password-group {
    position: relative;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    z-index: 2;
}

.toggle-password:hover {
    color: #333;
}

/* Terms & Conditions row */
.terms-group{ display:flex; align-items:center; gap:10px; margin-top:12px; }
.terms-group label{ display:flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
.terms-text{ font-size:14px; color:#444 }

/* Custom checkbox */
.custom-checkbox{ width:18px; height:18px; border-radius:4px; border:2px solid #ddd; display:inline-block; position:relative; transition:all .15s ease; background:#fff; flex:0 0 auto }
.custom-checkbox.checked{ background: linear-gradient(180deg,#ff7a59,#ff4b2b); border-color: #ff4b2b; box-shadow:0 2px 6px rgba(0,0,0,0.12); }
.custom-checkbox:after{ content:''; position:absolute; left:4px; top:1px; width:5px; height:9px; border:2px solid #fff; border-top:0; border-left:0; transform:rotate(45deg); opacity:0; transition:opacity .12s ease; }
.custom-checkbox.checked:after{ opacity:1 }

.terms-group a{ color:#ff5a3c; text-decoration:underline; }

/* Modal styles */
.modal{ position:fixed; left:0; top:0; width:100%; height:100%; display:none; align-items:center; justify-content:center; z-index:2000; }
.modal.show{ display:flex }
.modal-overlay{ position:absolute; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.6); }
.modal-window{ position:relative; background:#fff; width:92%; max-width:760px; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,0.25); padding:18px; z-index:2; display:flex; flex-direction:column; max-height:84vh; }
.modal-close{ position:absolute; right:12px; top:8px; font-size:22px; background:transparent; border:none; cursor:pointer; color:#555 }
.modal-title{ margin:0 0 8px 0; font-size:20px; color:#222 }
.modal-body{ overflow:auto; padding-right:6px; font-size:14px; line-height:1.6; border-top:1px solid #f0f0f0; padding-top:12px; }
.modal-body ol{ padding-left:18px; }
.modal-body .note{ margin-top:10px; font-style:italic; color:#666 }
.modal-footer{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px }
.modal-footer .btn-secondary{ background:#f0f0f0; color:#333 }
.modal-footer .btn-primary[disabled]{ opacity:0.6; cursor:not-allowed }

/* Small screens */
@media (max-width:480px){
    .modal-window{ padding:12px }
    .terms-group{ gap:8px; flex-direction:row }
}