/* ============================================================
   AUTH & ACCOUNT STYLING - Libryzo E Library
   Luxury Obsidian, Crimson Red & Cosmic Gold
   ============================================================ */

.auth-page {
    min-height: 100vh;
    background-color: var(--color-deep-black, #050508);
    color: var(--color-white, #f5f0e8);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    overflow-x: clip;
    max-width: 100vw;
}

.auth-section {
    min-height: 100vh;
    padding: 130px 20px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.auth-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    max-width: 90vw;
}

.auth-glow-1 {
    width: clamp(260px, 45vw, 480px);
    height: clamp(260px, 45vw, 480px);
    background: radial-gradient(circle, rgba(160, 21, 21, 0.45) 0%, transparent 70%);
    top: 10%;
    left: 0;
}

.auth-glow-2 {
    width: clamp(240px, 40vw, 450px);
    height: clamp(240px, 40vw, 450px);
    background: radial-gradient(circle, rgba(212, 168, 83, 0.35) 0%, transparent 70%);
    bottom: 10%;
    right: 0;
}

.auth-card {
    background: linear-gradient(145deg, rgba(22, 22, 38, 0.72) 0%, rgba(12, 12, 22, 0.88) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(240, 215, 140, 0.22);
    border-radius: 24px;
    padding: clamp(28px, 4.5vw, 48px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 45px rgba(139, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 10;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    border-color: rgba(240, 215, 140, 0.35);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7), 0 0 55px rgba(160, 21, 21, 0.25);
}

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

.auth-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(255, 45, 45, 0.25) 0%, rgba(139, 0, 0, 0.08) 80%);
    border: 1px solid rgba(240, 215, 140, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(139, 0, 0, 0.25);
}

.auth-icon-wrap i {
    font-size: 2rem;
    color: var(--color-glowing-red, #ff2d2d);
}

.auth-title {
    font-family: var(--font-cinzel, serif);
    font-size: clamp(1.6rem, 3.2vw, 2.1rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Form Fields */
.auth-field {
    margin-bottom: 22px;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 8px;
}

.auth-label i {
    color: var(--color-gold-light, #f0d78c);
    font-size: 0.95rem;
}

.auth-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 14px;
    background: rgba(18, 18, 32, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-input-group:focus-within {
    border-color: rgba(240, 215, 140, 0.7);
    box-shadow: 0 0 0 3px rgba(199, 40, 50, 0.25), 0 0 20px rgba(216, 173, 82, 0.18);
    background: rgba(24, 24, 42, 0.85);
}

.auth-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.05rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--color-gold-light, #f0d78c);
}

.auth-control {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 13px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none !important;
    box-shadow: none !important;
}

.auth-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.auth-toggle-pass {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-toggle-pass:hover {
    color: var(--color-gold-light, #f0d78c);
    transform: scale(1.1);
}

/* Single Input Variant */
.auth-control-standalone {
    width: 100%;
    border-radius: 14px;
    background: rgba(18, 18, 32, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 13px 18px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.auth-control-standalone:focus {
    border-color: rgba(240, 215, 140, 0.7);
    box-shadow: 0 0 0 3px rgba(199, 40, 50, 0.25), 0 0 20px rgba(216, 173, 82, 0.18);
    background: rgba(24, 24, 42, 0.85);
}

/* 6-digit Code Input */
.auth-code-input {
    letter-spacing: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
}

/* Buttons */
.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 30px;
    border: none;
    background: var(--gradient-red, linear-gradient(135deg, #8b0000 0%, #c0392b 50%, #a01515 100%));
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(139, 0, 0, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(255, 45, 45, 0.6);
    color: #ffffff;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Avatar Preview Uploader */
.auth-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.auth-avatar-wrapper {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    cursor: pointer;
    margin-top: 8px;
}

.auth-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(240, 215, 140, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    background: #171725;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.auth-avatar-wrapper:hover .auth-avatar-img {
    border-color: var(--color-gold-light, #f0d78c);
    transform: scale(1.03);
}

.auth-avatar-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.auth-avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-red, linear-gradient(135deg, #8b0000, #c0392b));
    border: 2px solid #0c0c16;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.82rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.auth-avatar-wrapper:hover .auth-avatar-badge {
    transform: scale(1.15);
}

/* Links & Dividers */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.auth-link-gold {
    color: var(--color-gold-light, #f0d78c);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.auth-link-gold:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(240, 215, 140, 0.6);
}

.auth-link-crimson {
    color: var(--color-glowing-red, #ff2d2d);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link-crimson:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 26px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 14px;
}

/* Verification Resend Box */
.auth-resend-box {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-resend-box label {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 8px;
    display: block;
}

/* Custom Checkbox */
.auth-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.auth-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-crimson, #a01515);
    cursor: pointer;
}

/* Alerts */
.auth-alert {
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.auth-alert-danger {
    background: rgba(139, 0, 0, 0.25);
    border-color: rgba(255, 45, 45, 0.35);
    color: #ffc9c9;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #bbf7d0;
}

.auth-alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

/* Password Strength Bar */
.auth-strength-meter {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.auth-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.3s ease;
}
