/* ============================================
   Auth Modal — Sign in / Sign up / Forgot password
   ============================================ */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 16px;
    box-sizing: border-box;
}

.auth-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal {
    background: linear-gradient(180deg, rgba(20, 23, 38, 0.98), rgba(13, 15, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s ease;
    padding: 28px 24px 24px;
    color: #f0f0f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

.auth-modal-overlay.open .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 22px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.auth-modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.85rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #F5A623, #FFD054);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 6px;
}
.auth-modal-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    margin: 0;
}

/* Tab switcher */
.auth-modal-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 18px;
}
.auth-modal-tab {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.auth-modal-tab.active {
    background: rgba(245, 166, 35, 0.18);
    color: #FFD054;
    box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.3);
}

/* Form fields */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-field label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
.auth-field input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 11px 13px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-field input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.5);
    background: rgba(255, 255, 255, 0.06);
}
.auth-field input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Buttons */
.auth-submit {
    background: linear-gradient(135deg, #F5A623, #FFD054);
    color: #0d0f1a;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 4px;
    transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 166, 35, 0.3);
}
.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-discord-btn {
    width: 100%;
    background: #5865F2;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, transform 0.1s ease;
}
.auth-discord-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.auth-link {
    background: transparent;
    border: 0;
    color: rgba(245, 166, 35, 0.85);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    text-decoration: none;
    align-self: center;
}
.auth-link:hover {
    color: #FFD054;
    text-decoration: underline;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 12px;
}

/* Status messages */
.auth-message {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.auth-message.error {
    background: rgba(255, 60, 60, 0.1);
    border: 1px solid rgba(255, 60, 60, 0.25);
    color: #ff8080;
}
.auth-message.success {
    background: rgba(80, 200, 120, 0.08);
    border: 1px solid rgba(80, 200, 120, 0.25);
    color: #8de4a8;
}
.auth-message.info {
    background: rgba(100, 180, 255, 0.08);
    border: 1px solid rgba(100, 180, 255, 0.2);
    color: #a8d4ff;
}

/* Confirmation view */
.auth-confirmation {
    text-align: center;
    padding: 16px 8px;
}
.auth-confirmation-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD054;
}
.auth-confirmation h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1.5px;
    margin: 0 0 8px;
    color: #fff;
}
.auth-confirmation p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 16px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 22px 18px 18px;
    }
    .auth-modal-title {
        font-size: 1.6rem;
    }
}
