@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "DM Sans", sans-serif;
}

h1, h2, h3, h4, h5, h6, .title {
    font-family: "Nunito", sans-serif;
}

:root {
    --primary-color: #ff8432;
    --border-color: #f1f5f9;
    --border: 1.5px solid var(--border-color);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --primary-soft: color-mix(in srgb, var(--primary-color) 8%, transparent);
    --primary-faint: color-mix(in srgb, var(--primary-color) 4%, transparent);
}

[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #030712;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.06);
    --border: 1.5px solid var(--border-color);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --primary-soft: color-mix(in srgb, var(--primary-color) 14%, transparent);
    --primary-faint: color-mix(in srgb, var(--primary-color) 8%, transparent);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============ AUTH CONTAINER & LAYOUT ============ */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

/* Blurred background glow orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] .glow-orb {
    opacity: 0.12;
}

.glow-orb-1 {
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background-color: var(--primary-color);
}

.glow-orb-2 {
    bottom: -10%;
    left: -10%;
    width: 350px;
    height: 350px;
    background-color: var(--primary-color);
}

/* AUTH CARD */
.auth-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background-color: var(--bg-primary);
    border: var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--box-shadow);
}

[data-theme="dark"] .auth-card {
    background-color: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* AUTH HEADER */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.auth-logo {
    display: inline-block;
}

.logo {
    width: 130px;
}

/* Light/dark logo switching */
.logo-light {
    display: inline-block;
}
.logo-dark {
    display: none;
}
[data-theme="dark"] .logo-light {
    display: none;
}
[data-theme="dark"] .logo-dark {
    display: inline-block;
}

.auth-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.auth-header .title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.auth-header .description {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 340px;
    margin: -6px auto 0 auto;
}

/* FORM FIELDS */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* PREFIX INPUT ICONS */
.input-icon-group {
    position: relative;
    width: 100%;
}

.input-icon-group > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.25s ease;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 46px; /* indent left padding for prefix icon */
    border: var(--border);
    outline: none;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.25s ease;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    background-color: rgba(3, 7, 18, 0.4);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

/* Highlight prefix icon on input focus */
.form-control:focus ~ i {
    color: var(--primary-color);
}

.form-control::placeholder {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* PASSWORD VISIBILITY TOGGLE */
.password-toggle-wrapper {
    position: relative;
}

.password-toggle-wrapper .form-control {
    padding-right: 44px; /* indent right padding for suffix toggle icon */
}

.password-toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Ensure button sits on top of the input for clickability */
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}

/* CAPTCHA DESIGN */
.captcha-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-text-box {
    height: 48px;
    padding: 0 20px;
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border: 1px dashed color-mix(in srgb, var(--primary-color) 30%, transparent);
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: monospace;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex-shrink: 0;
}

.captcha-refresh-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--bg-secondary);
    border: var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

[data-theme="dark"] .captcha-refresh-btn {
    background-color: rgba(3, 7, 18, 0.4);
}

.captcha-refresh-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-faint);
}

.captcha-refresh-btn i {
    transition: transform 0.3s ease;
}

.captcha-refresh-btn:active i {
    transform: rotate(180deg);
}

/* TERMS OF USE BADGE */
.auth-terms {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
    margin-top: 4px;
}

.auth-terms-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 550;
    transition: color 0.2s ease;
}

.auth-terms-link:hover {
    color: var(--primary-color);
}

/* BUTTONS */
.auth-btn {
    width: 100%;
    height: 48px;
    padding: 12px 18px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 30%, transparent);
    border: 1px solid var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.auth-btn:hover {
    background-color: color-mix(in srgb, var(--primary-color) 88%, black);
    border-color: color-mix(in srgb, var(--primary-color) 88%, black);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

/* SOCIAL INTEGRATION */
.auth-social {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.auth-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.auth-btn-google {
    width: 100%;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: var(--border);
    border-radius: 10px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

[data-theme="dark"] .auth-btn-google {
    background-color: rgba(3, 7, 18, 0.4);
}

.auth-btn-google:hover {
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.auth-btn-google img {
    width: 18px;
    height: 18px;
}

/* FOOTER LINKS */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1.5px solid var(--border-color);
    padding-top: 20px;
}

[data-theme="dark"] .auth-footer {
    border-top-color: rgba(255,255,255,0.06);
}

.auth-footer-line {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
}

.auth-footer-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: var(--primary-color);
}

.auth-footer-link--block {
    display: inline-block;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 550;
    transition: color 0.2s ease;
}

.auth-footer-link--block:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* RESPONSIVE DESIGN */
@media (max-width: 576px) {
    .auth-container {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-header .title {
        font-size: 20px;
    }

    .auth-header .description {
        font-size: 13px;
    }
}