/* ================================================================
   UTD Games — Auth Pages Styles
   ================================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.85) 0%, rgba(21, 38, 45, 0.8) 100%);
    backdrop-filter: blur(1px);
}

.auth-card {
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.95) 0%, rgba(39, 44, 52, 0.92) 100%);
    border: 1px solid rgba(48, 54, 61, 0.8);
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    margin: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

.game-logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.game-logo {
    max-height: 120px;
    max-width: 250px;
    margin-bottom: 1.5rem;
    filter: brightness(1.1) contrast(1.1);
}

.utd-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(45, 51, 59, 0.8);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(45, 51, 59, 0.95);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--accent-warning);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.auth-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-button:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: translateY(-1px);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: auth-spin 1s ease-in-out infinite;
}

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

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-primary);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Auth links container */
.auth-links {
    text-align: center;
}

.auth-links p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Auth login row: remember + forgot */
.auth-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
}

.auth-login-row .remember-checkbox {
    margin: 0;
}

.forgot-password-link {
    color: var(--accent-primary);
    font-size: .85rem;
    text-decoration: none;
    transition: color .2s;
}
.forgot-password-link:hover {
    color: var(--accent-secondary);
}

/* Success alert on register page */
.auth-success-alert {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-success-alert-text {
    position: relative;
    z-index: 1;
}

/* Register page wider card */
.auth-card-wide {
    min-width: 550px;
}

/* Phone input row */
.phone-input-row {
    display: flex;
    gap: 0.5rem;
}

.phone-country-select {
    width: 110px;
    flex-shrink: 0;
    background: rgb(28 33 40);
}

.phone-input-row .form-input:not(.phone-country-select) {
    flex: 1;
}

/* Uppercase input (referral code) */
.form-input-uppercase {
    text-transform: uppercase;
}

/* Referral code label hint */
.form-label-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: normal;
}

/* Referral code small text */
.form-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Forgot password states */
.forgot-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(16,185,129,0.12);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.forgot-success-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.forgot-success-text {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.forgot-success-hint {
    color: var(--text-muted);
    font-size: .8rem;
    margin-bottom: 1.5rem;
}

.forgot-form-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: .5rem;
}

.forgot-form-desc {
    color: var(--text-secondary);
    font-size: .85rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Game-specific background adjustments */
.auth-container.dragon-nest {
    background-image: url('/assets/images/dragonnest/card.png?v=1.0.2');
}

.auth-container.bombom {
    background-image: url('/assets/images/bombom/bb-card.png?v=1.0.2');
}

/* ── Responsive: Register wide card ── */
@media (max-width: 600px) {
    .auth-card-wide {
        min-width: auto !important;
        width: 95% !important;
        padding: 2rem;
        margin: 1rem;
    }
}

/* ── Responsive: Tablet ── */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 1.25rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .game-logo {
        max-height: 100px;
        max-width: 200px;
        margin-bottom: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 1.25rem;
    }
}

/* ── Responsive: Mobile ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin: 0.75rem;
        border-radius: 1rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-subtitle {
        font-size: 0.82rem;
    }

    .game-logo {
        max-height: 80px;
        max-width: 180px;
    }

    .game-logo-section {
        margin-bottom: 1.25rem;
    }

    .form-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .auth-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .auth-link {
        padding: 0.625rem 1.25rem;
        font-size: 0.82rem;
        width: 100%;
        justify-content: center;
    }
}
