/*
 * macblash-auth.css
 * rusty begin new code | 2026-08-25 00:56
 * Action: Auth + Profile unified cyberpunk design system
 * Covers: /register /log-in /site-active /forget-password /reset-password /my-profile /my-profile/edit
 * v1.0
 */

/* rusty begin update | 2026-09-02 00:00
   Action: Global Typography Refactor — replaced every 'Tajawal', sans-serif (26 occurrences,
   including the 'Space Grotesk', 'Tajawal', sans-serif combos) with 'Sukar', sans-serif /
   'Space Grotesk', 'Sukar', sans-serif throughout this file. CLAUDE.md guardrail update:
   no more 'Tajawal'/generic AI fonts — Sukar is now the local primary UI font. */
/* rusty end update */

/* ============================================================
   1. SHARED AUTH PAGE LAYOUT
   ============================================================ */
.auth-page-wrapper {
    min-height: calc(100vh - 80px); /* subtract header height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 60px;
    position: relative;
    isolation: isolate;
}

/* Ambient neon glows — float behind the card, above the canvas */
.auth-ambient-left {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.auth-ambient-right {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.13) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

/* ============================================================
   2. AUTH CARD — Glassmorphism Panel
   ============================================================ */
.auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

/* Gradient border trick — purple → cyan 1.5px glow border */
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.45), rgba(139, 92, 246, 0.45));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Wider card variant for register */
.auth-card--wide {
    max-width: 640px;
}

/* ============================================================
   3. AUTH TYPOGRAPHY
   ============================================================ */
.auth-title {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.auth-subtitle {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.auth-title-icon {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: #8b5cf6;
}

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

/* ============================================================
   4. AUTH FORM INPUTS
   ============================================================ */
.auth-input-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    height: 52px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.9375rem;
    padding: 0 48px 0 16px; /* RTL: icon on right */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: 'Sukar', sans-serif;
    -webkit-appearance: none; /* rusty begin update | 2026-08-25 01:08 — fix lint: standard property + vendor prefix */
    appearance: none;         /* rusty end update */
}

[dir="ltr"] .auth-input {
    padding: 0 16px 0 48px;
}


.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.45);
}

.auth-input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3), 0 0 12px rgba(6, 182, 212, 0.15);
}

/* rusty begin update | 2026-09-01 15:00 */
/* Action: Reverted the display:contents attempt — it dropped .auth-input-icon's own box
   entirely, which destroyed its positioning context and pushed every prefix icon outside the
   input boxes. Restored .auth-input-icon as the absolutely-positioned wrapper (rigid structure);
   the nested .macblash-cyber-icon now simply centers inside it via flex instead of needing its
   own position. */

/* 1. Lock the parent container */
.auth-input-group {
    position: relative !important;
    width: 100%;
}

/* 2. Position the wrapper inside the input */
.auth-input-icon {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    pointer-events: none; /* Allows clicking through to the input */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    color: #64748b;
    transition: color 0.2s ease;
}

.auth-input-group:focus-within .auth-input-icon {
    color: #06b6d4;
}

/* 3. LTR English Placement (Icon Left, Text pushed Right) */
html[dir="ltr"] .auth-input-icon {
    left: 16px !important;
    right: auto !important;
}
html[dir="ltr"] .auth-input:not(.iti__tel-input) {
    padding-left: 45px !important;
    padding-right: 14px !important;
}

/* 4. RTL Arabic Placement (Icon Right, Text pushed Left) */
html[dir="rtl"] .auth-input-icon {
    right: 16px !important;
    left: auto !important;
}
html[dir="rtl"] .auth-input:not(.iti__tel-input) {
    padding-right: 45px !important;
    padding-left: 14px !important;
}
/* rusty end update */

/* rusty begin update | 2026-09-01 15:00 */
/* Action: Password toggle eye button — rigid absolute positioning on the opposite side of the
   lock icon, kept clickable (no pointer-events:none here, unlike .auth-input-icon). */
.auth-eye-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 11;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.2s ease;
}

/* Eye icon on the RIGHT in English */
html[dir="ltr"] .auth-eye-btn {
    right: 16px !important;
    left: auto !important;
}

/* Eye icon on the LEFT in Arabic */
html[dir="rtl"] .auth-eye-btn {
    left: 16px !important;
    right: auto !important;
}

.auth-eye-btn:hover {
    color: #06b6d4;
}
/* rusty end update */

/* rusty begin new code | 2026-09-01 12:00 */
/* Action: Iconify mask icon for the eye-toggle button (replaces FontAwesome fa-eye/fa-eye-slash). Base .macblash-cyber-icon lives in macblash-site-theme.css; this only supplies the two mask URLs swapped via JS. */
.auth-eye-icon {
    width: 1.125rem;
    height: 1.125rem;
    -webkit-mask-image: url('https://api.iconify.design/ph/eye-bold.svg');
    mask-image: url('https://api.iconify.design/ph/eye-bold.svg');
}

.auth-eye-icon.is-hidden {
    -webkit-mask-image: url('https://api.iconify.design/ph/eye-slash-bold.svg');
    mask-image: url('https://api.iconify.design/ph/eye-slash-bold.svg');
}
/* rusty end new code */

/* rusty begin update | 2026-09-01 14:00 */
/* Action: intl-tel-input (register phone field) — flag and dial code always on the LEFT in BOTH
   languages (phone numbers read left-to-right regardless of page direction; user decision).
   The plugin injects its own inline styles (style="right:0px" on .iti__country-container,
   style="padding-right:91px" on the input) on load/resize, which beat any non-!important rule
   regardless of selector specificity — !important is required here to win against those inline
   styles. Superseded the earlier html[dir]-conditional left/right split. */
.iti__country-container {
    right: auto !important;
    left: 0 !important;
}

.iti__selected-flag {
    direction: ltr !important; /* keeps [Flag] then [+Code] internal order fixed in both languages */
}

.iti .auth-input.iti__tel-input {
    padding-left: 95px !important;
    padding-right: 14px !important;
    text-align: left !important;
    direction: ltr !important;
}
/* rusty end update */

/* rusty begin update | 2026-09-01 16:00 */
/* Action: The previous attempt targeted .iti__selected-flag, but this project loads
   intl-tel-input v24.4.0 (see register.blade.php), which renamed that element to
   .iti__selected-country (a <button> wrapping .iti__selected-country-primary [the flag] and
   .iti__selected-dial-code [+966] as siblings, in that DOM order). Under html[dir="rtl"] the
   inherited RTL direction reverses the visual order of those two flex children, rendering
   [+966][Flag] instead of [Flag][+966]. Forcing direction:ltr on the actual button element
   makes the flex row start left-to-right again, matching the real markup. */
html[dir="rtl"] .iti__selected-country {
    display: flex !important;
    flex-direction: row !important; /* Forces [Flag] -> [Arrow] -> [Code] */
    direction: ltr !important; /* Fixes the + sign placement so it reads +966 */
    align-items: center !important;
}

/* Ensure proper spacing between the flag/arrow and the dial code */
html[dir="rtl"] .iti__selected-dial-code {
    margin-left: 6px !important;
    margin-right: 0 !important;
}
/* rusty end update */

/* Input with eye icon (password field — extra padding) */
.auth-input--password {
    padding-left: 48px; /* space for eye icon */
}

[dir="ltr"] .auth-input--password {
    padding-left: unset;
    padding-right: 48px;
}

/* Select element styling */
.auth-select {
    width: 100%;
    height: 52px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.9375rem;
    padding: 0 16px;
    transition: border-color 0.2s ease;
    outline: none;
    appearance: none;
    font-family: 'Sukar', sans-serif;
    cursor: pointer;
}

.auth-select:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.auth-select option {
    background: #0f172a;
    color: #f1f5f9;
}

/* ============================================================
   5. AUTH BUTTONS
   ============================================================ */
.auth-btn-primary {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
    transition: box-shadow 0.25s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
    margin-top: 8px;
}

.auth-btn-primary:hover {
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.45), 0 0 15px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.auth-btn-primary:active {
    transform: scale(0.97);
}

.auth-btn-ghost {
    width: 100%;
    height: 48px;
    background: transparent;
    border: 1.5px solid rgba(6, 182, 212, 0.4);
    border-radius: 12px;
    color: #06b6d4;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    margin-top: 10px;
}

.auth-btn-ghost:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: #06b6d4;
}

/* ============================================================
   6. AUTH LINKS & FOOTER TEXT
   ============================================================ */
.auth-footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 24px;
}

.auth-footer-text a,
.auth-link {
    color: #8b5cf6;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer-text a:hover,
.auth-link:hover {
    color: #06b6d4;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #334155;
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 92, 246, 0.25), transparent);
}

/* ============================================================
   7. OTP CELLS
   ============================================================ */
.otp-fields-new {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px 0;
    direction: ltr;
}

.otp-cell {
    width: 56px;
    height: 64px;
    background: rgba(139, 92, 246, 0.06);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(139, 92, 246, 0.25);
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Space Grotesk', monospace;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: text;
}

.otp-cell:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.35), 0 0 16px rgba(6, 182, 212, 0.2);
    animation: otp-active-pulse 1.5s ease-in-out infinite;
}

.otp-cell.otp-filled {
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.04);
}

@keyframes otp-active-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.35), 0 0 16px rgba(6, 182, 212, 0.2); }
    50%       { box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.5),  0 0 28px rgba(6, 182, 212, 0.35); }
}

/* OTP Timer blocks */
.otp-timer-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 24px;
}

.otp-timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 10px 20px;
    min-width: 68px;
}

.otp-timer-digit {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #8b5cf6;
    line-height: 1;
}

.otp-timer-label {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 4px;
}

.otp-timer-colon {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #8b5cf6;
}

/* New resend button style */
.auth-resend-btn {
    background: none;
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #8b5cf6;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Sukar', sans-serif;
}

.auth-resend-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.6);
}

.auth-resend-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-resend-timer {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(139, 92, 246, 0.85);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 42px;
    text-align: center;
}

/* ============================================================
   8. PASSWORD STRENGTH INDICATOR
   ============================================================ */
.auth-strength-wrap {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.auth-strength-block {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    transform-origin: left;
    transition: background 0.3s ease;
}

.auth-strength-block.weak   { background: #ef4444; }
.auth-strength-block.medium { background: #f97316; }
.auth-strength-block.strong { background: #06b6d4; }

.auth-strength-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
    text-align: end;
}

/* ============================================================
   9. CHECKBOX & RADIO (terms, gender)
   ============================================================ */
.auth-check-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.auth-check-input {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-check-label {
    font-size: 0.875rem;
    color: #94a3b8;
    cursor: pointer;
}

.auth-check-label a {
    color: #8b5cf6;
    font-weight: 700;
    text-decoration: none;
}

/* ============================================================
   10. FORM SECTION DIVIDER (HUD style)
   ============================================================ */
.auth-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 16px;
    color: #475569;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'Space Grotesk', monospace;
}

.auth-section-head::before,
.auth-section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(139,92,246,0.15), transparent);
}

.auth-section-head::before {
    background: linear-gradient(to left, rgba(139,92,246,0.15), transparent);
}

/* ============================================================
   11. ERROR / ALERT BANNERS
   ============================================================ */
.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert-success {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    color: #67e8f9;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ============================================================
   12. PROFILE COMPLETION POPUP MODAL
   ============================================================ */
.profile-complete-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    isolation: isolate;
}

.profile-complete-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 36px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    animation: modal-scale-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-complete-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(139, 92, 246, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes modal-scale-in {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* SVG Circular Progress Ring */
.profile-complete-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-complete-ring-svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.profile-complete-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 8;
}

.profile-complete-ring-fill {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-complete-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.profile-complete-title {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 1.375rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 8px;
}

.profile-complete-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.profile-complete-fields {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-complete-fields li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #94a3b8;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.profile-complete-fields li .pcf-icon {
    color: #8b5cf6;
    font-size: 1rem;
    flex-shrink: 0;
}

.profile-complete-cta {
    display: flex;
    gap: 12px;
}

.profile-complete-cta .btn-fill {
    flex: 1;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease;
    font-family: 'Sukar', sans-serif;
}

.profile-complete-cta .btn-fill:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    color: #fff;
}

.profile-complete-cta .btn-later {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 20px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Sukar', sans-serif;
}

.profile-complete-cta .btn-later:hover {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
}

/* ============================================================
   13. USER PROFILE PAGE
   ============================================================ */
.profile-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Cover banner */
.profile-banner {
    width: 100%;
    height: 220px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.8);
    background-image:
        radial-gradient(circle at 30% 50%, rgba(139,92,246,0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(6,182,212,0.1) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%238b5cf6' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-blend-mode: overlay;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.profile-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(13, 15, 26, 0.85) 0%, transparent 100%);
}

.profile-banner-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

/* Profile identity row */
.profile-identity {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 0 28px 24px;
    margin-bottom: 24px;
}

.profile-avatar-ring {
    position: relative;
    margin-top: -50px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    flex-shrink: 0;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d0f1a;
}

.profile-online-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid #0d0f1a;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.profile-name-block {
    flex: 1;
    padding-bottom: 4px;
}

.profile-username {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 4px;
}

.profile-handle {
    font-size: 0.875rem;
    color: #8b5cf6;
    font-family: 'Space Grotesk', monospace;
}

.profile-edit-btn {
    height: 44px;
    padding: 0 22px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: box-shadow 0.2s ease;
    align-self: flex-end;
    margin-bottom: 4px;
    font-family: 'Sukar', sans-serif;
}

.profile-edit-btn:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    color: #fff;
}

/* Profile completion bar */
.profile-completion-banner {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-completion-pct-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 900;
    color: #8b5cf6;
    flex-shrink: 0;
}

.profile-completion-bar-wrap {
    flex: 1;
}

.profile-completion-text {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.profile-completion-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
}

.profile-completion-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-completion-cta-link {
    font-size: 0.875rem;
    color: #06b6d4;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Stats cards */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.profile-stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.profile-stat-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    display: block;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    display: block;
}

/* Achievement badges */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.achievement-icon {
    width: 64px;
    height: 64px;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: box-shadow 0.3s ease;
}

.achievement-badge.unlocked .achievement-icon {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.achievement-badge.locked .achievement-icon {
    filter: grayscale(0.8);
    opacity: 0.45;
}

.achievement-name {
    font-size: 0.6875rem;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
}

/* Glass section card */
.profile-section-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.profile-section-title {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title i,
.profile-section-title .material-icons {
    color: #06b6d4;
    font-size: 1.1rem;
}

/* Activity items */
.profile-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.profile-activity-item:last-child {
    border-bottom: none;
}

.profile-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    flex-shrink: 0;
}

.profile-activity-text {
    flex: 1;
    font-size: 0.875rem;
    color: #94a3b8;
}

.profile-activity-time {
    font-size: 0.75rem;
    color: #475569;
    font-family: 'Space Grotesk', monospace;
    white-space: nowrap;
}

/* ============================================================
   14. EDIT PROFILE PAGE
   ============================================================ */
.edit-profile-layout {
    display: flex;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
    align-items: flex-start;
}

/* Left sidebar */
.edit-profile-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px 12px;
    backdrop-filter: blur(12px);
}

.edit-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edit-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Sukar', sans-serif;
}

.edit-sidebar-link i {
    color: #06b6d4;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.edit-sidebar-link:hover {
    background: rgba(255,255,255,0.04);
    color: #e2e8f0;
}

.edit-sidebar-link.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.18) 0%, rgba(6,182,212,0.08) 100%);
    color: #e2e8f0;
    border-inline-end: 3px solid #8b5cf6;
}

/* Main content area */
.edit-profile-main {
    flex: 1;
    min-width: 0;
}

.edit-profile-main-title {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px;
}

.edit-profile-main-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 28px;
}

/* Cover upload zone */
.edit-cover-zone {
    position: relative;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px dashed rgba(255,255,255,0.1);
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-bottom: 60px; /* space for overlapping avatar */
}

.edit-cover-zone:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.edit-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    color: #94a3b8;
    gap: 6px;
    transition: background 0.2s ease;
}

.edit-cover-zone:hover .edit-cover-overlay {
    background: rgba(139, 92, 246, 0.15);
}

.edit-cover-overlay i { font-size: 2rem; color: #ffffff; }
.edit-cover-overlay span { font-size: 0.875rem; font-weight: 600; color: #ffffff; }
.edit-cover-overlay small { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* Avatar overlapping the cover */
.edit-avatar-overlap {
    position: absolute;
    bottom: -48px;
    right: 20px; /* RTL: right side */
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

[dir="ltr"] .edit-avatar-overlap {
    right: unset;
    left: 20px;
}

.edit-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d0f1a;
}

/* Edit profile form section */
.edit-form-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.edit-form-section-title {
    font-family: 'Space Grotesk', 'Sukar', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-form-section-title i {
    color: #06b6d4;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.edit-form-grid--full {
    grid-column: 1 / -1;
}

/* Textarea for bio */
.auth-textarea {
    width: 100%;
    min-height: 90px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.9375rem;
    padding: 14px 16px;
    transition: border-color 0.2s ease;
    outline: none;
    resize: vertical;
    font-family: 'Sukar', sans-serif;
    line-height: 1.6;
}

.auth-textarea:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3);
}

/* Platform / genre chip checkboxes */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.platform-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(255,255,255,0.03);
    border: 1.5px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
}

.platform-chip input[type="checkbox"] {
    display: none;
}

.platform-chip:has(input:checked) {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.45);
    color: #e2e8f0;
}

/* rusty begin new code | 2026-08-29 23:50 */
/* Action: Platform + tag rows (Stage 3) */
.gaming-tag-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.gaming-tag-row .auth-select { flex: 0 0 170px; }
.gaming-tag-row .auth-input  { flex: 1; }
.gaming-tag-remove-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.gaming-tag-remove-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
}
.gaming-tag-remove-btn .macblash-cyber-icon { width: 0.85em; height: 0.85em; }

/* Action: Privacy toggle switches (Stage 4) */
.privacy-toggles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}
.privacy-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
}
.privacy-toggle-row:last-child,
.privacy-toggle-row:nth-last-child(2) {
    border-bottom: none;
}
.privacy-toggle-row span:first-child {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 600;
}
.privacy-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.privacy-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.privacy-switch-track {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
.privacy-switch-track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    inset-inline-start: 2px;
    top: 2px;
    background: #94a3b8;
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}
.privacy-switch input:checked + .privacy-switch-track {
    background: rgba(139, 92, 246, 0.35);
    border-color: rgba(139, 92, 246, 0.6);
}
.privacy-switch input:checked + .privacy-switch-track::before {
    transform: translateX(-18px);
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}
[dir="ltr"] .privacy-switch input:checked + .privacy-switch-track::before {
    transform: translateX(18px);
}
/* rusty end new code */

/* Save button inside edit profile */
.edit-save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* Live completion bar in edit profile */
.edit-completion-bar-wrap {
    background: rgba(139,92,246,0.06);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.edit-completion-pct {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 900;
    color: #8b5cf6;
    flex-shrink: 0;
    min-width: 48px;
}

/* ============================================================
   15. MOBILE RESPONSIVE (max-width: 768px)
   ============================================================
   RULE: NEVER modify desktop CSS here. Mobile-only.
   ============================================================ */
@media (max-width: 768px) {
    .auth-page-wrapper {
        padding: 24px 12px 40px;
        align-items: flex-start;
        /* Dynamic full width */
        width: 100%;
        box-sizing: border-box;
    }

    .auth-card {
        padding: 32px 20px;
        border-radius: 18px;
        /* Dynamic fluid sizing */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        /* GPU sandboxing to prevent scrolling flicker */
        isolation: isolate !important;
        will-change: auto !important;
    }

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

    .auth-input {
        /* Ensure minimum tap target */
        min-height: 48px;
    }

    .auth-btn-primary {
        min-height: 50px;
        font-size: 0.9375rem;
    }

    .otp-cell {
        /* Fluid OTP cell width based on available space minus gaps */
        flex: 1 1 auto;
        min-height: 52px;
        font-size: 1.25rem;
        border-radius: 10px;
    }

    .otp-fields-new {
        gap: 8px;
        width: 100%;
    }

    .profile-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .edit-profile-layout {
        flex-direction: column;
        padding: 0 12px 40px;
        width: 100%;
        box-sizing: border-box;
    }

    .edit-profile-sidebar {
        width: 100%;
        position: static;
        box-sizing: border-box;
    }

    .edit-sidebar-nav {
        /* Horizontal scroll for sidebar nav on mobile to save vertical space */
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* space for scrollbar */
    }

    /* Hide scrollbar for cleaner look */
    .edit-sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .edit-sidebar-nav {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .edit-sidebar-link {
        font-size: 0.8125rem;
        padding: 10px 14px;
        white-space: nowrap; /* keep links on one line */
        flex: 0 0 auto;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-identity {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 16px 20px;
    }

    .profile-complete-cta {
        flex-direction: column;
    }

    .profile-complete-cta .btn-fill,
    .profile-complete-cta .btn-later {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    .auth-ambient-left,
    .auth-ambient-right {
        /* Reduce on mobile to prevent performance issues */
        width: 60vw;
        height: 60vw;
        /* NO translateZ or 3D transforms — flat 2D only per workspace rules */
    }
}
/* rusty end new code | 2026-08-25 00:56 */

/* ============================================================
   PROFILE PAGE STYLES
   rusty begin new code | 2026-08-25 01:06
   Action: User Profile, Edit Profile, Completion Popup, OTP
   ============================================================ */

/* ---- Profile page wrapper ---- */
.profile-page-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px 80px;
    position: relative;
}

/* ---- Banner ---- */
.profile-banner {
    width: 100%;
    height: 200px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(6,182,212,0.15) 50%, rgba(15,23,42,0.8) 100%);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(139,92,246,0.2);
}
.profile-banner-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

/* ---- Identity row below banner ---- */
.profile-identity {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    background: rgba(13, 17, 34, 0.85);
    backdrop-filter: blur(20px);
    padding: 16px 24px 20px;
    border: 1px solid rgba(255,255,255,0.05);
    border-top: none;
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
}

/* ---- Avatar Ring ---- */
.profile-avatar-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    padding: 3px;
    margin-top: -45px;
    position: relative;
    flex-shrink: 0;
}
.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d0f1a;
    display: block;
}
.profile-online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #0d0f1a;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
}

/* ---- Name block ---- */
.profile-username {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 2px;
    line-height: 1.2;
}
.profile-handle {
    font-size: 0.85rem;
    color: #8b5cf6;
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.05em;
}

/* ---- Edit profile button ---- */
.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.35);
    color: #a78bfa;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    will-change: transform;
    font-family: 'Sukar', sans-serif;
}
.profile-edit-btn:hover {
    background: rgba(139,92,246,0.22);
    border-color: rgba(139,92,246,0.6);
    color: #c4b5fd;
    text-decoration: none;
}

/* ---- Completion Banner ---- */
.profile-completion-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(139,92,246,0.07);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 12px;
    padding: 14px 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.profile-completion-pct-label {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Space Grotesk', monospace;
    min-width: 60px;
    text-align: center;
}
.profile-completion-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 5px;
}
.profile-completion-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
    overflow: hidden;
}
.profile-completion-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 12px rgba(139,92,246,0.4);
}
.profile-completion-cta-link {
    font-size: 0.8125rem;
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}
.profile-completion-cta-link:hover { color: #a78bfa; }

/* ---- Stats Row ---- */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 20px;
}
.profile-stat-card {
    background: rgba(13, 17, 34, 0.85);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(12px);
}
.profile-stat-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-stat-label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Section cards (grid) ---- */
.profile-section-card {
    background: rgba(13, 17, 34, 0.85);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 24px;
    backdrop-filter: blur(16px);
}
.profile-section-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.profile-section-title i { color: #8b5cf6; }

/* ---- Activity items ---- */
.profile-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.875rem;
}
.profile-activity-item:last-child { border-bottom: none; }
.profile-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    flex-shrink: 0;
}
.profile-activity-text { color: #94a3b8; flex: 1; }
.profile-activity-time { font-size: 0.75rem; color: #475569; }

/* ---- Achievements grid ---- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 12px;
    transition: transform 0.2s ease;
}
.achievement-badge.unlocked {
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.25);
}
.achievement-badge.locked {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    opacity: 0.35;
    filter: grayscale(1);
}
.achievement-icon { font-size: 1.6rem; }
.achievement-name { font-size: 0.7rem; color: #64748b; font-weight: 600; text-align: center; }

/* ---- Edit Profile layout ---- */
.edit-profile-layout {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 24px;
    align-items: start;
}

/* ---- Sidebar ---- */
.edit-profile-sidebar {
    position: sticky;
    top: 90px;
    background: rgba(13, 17, 34, 0.9);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.edit-sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.edit-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: 'Sukar', sans-serif;
}
.edit-sidebar-link:hover, .edit-sidebar-link.active {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    text-decoration: none;
}
.edit-sidebar-link i { width: 16px; flex-shrink: 0; }

/* ---- Main content ---- */
.edit-profile-main {
    min-width: 0;
}
.edit-profile-main-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 4px;
}
.edit-profile-main-subtitle {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 24px;
}

/* ---- Form sections ---- */
.edit-form-section {
    background: rgba(13, 17, 34, 0.85);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(16px);
    margin-bottom: 20px;
}
.edit-form-section-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.edit-form-section-title i { color: #8b5cf6; }

/* ---- 2-col form grid ---- */
.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.edit-form-grid--full { grid-column: 1 / -1; }

/* ---- Cover upload zone ---- */
.edit-cover-zone {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    border: 2px dashed rgba(139,92,246,0.3);
    background: rgba(139,92,246,0.04);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.edit-cover-zone:hover { border-color: rgba(139,92,246,0.6); }
.edit-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.85rem;
    font-family: 'Sukar', sans-serif;
}
.edit-cover-overlay i { font-size: 1.5rem; }
.edit-cover-overlay small { font-size: 0.75rem; color: #334155; }

/* Avatar overlapping the cover */
.edit-avatar-overlap {
    position: absolute;
    bottom: -28px;
    right: 24px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    padding: 2px;
    cursor: pointer;
    z-index: 2;
}
.edit-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0d0f1a;
    pointer-events: none;
}

/* ---- Textarea ---- */
.auth-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 0.9375rem;
    padding: 14px 16px;
    resize: vertical;
    min-height: 90px;
    outline: none;
    font-family: 'Sukar', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-textarea:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.3);
}

/* ---- Platform/Genre chip grid ---- */
.platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.platform-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Sukar', sans-serif;
    user-select: none;
}
.platform-chip input[type="checkbox"] { display: none; }
.platform-chip:has(input:checked) {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.5);
    color: #a78bfa;
}
.platform-chip:hover { border-color: rgba(139,92,246,0.3); color: #94a3b8; }

/* ---- Save bar ---- */
.edit-save-bar {
    position: sticky;
    bottom: 20px;
    background: rgba(13, 17, 34, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    z-index: 100;
}

/* ---- Ghost button variant ---- */
.auth-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    background: rgba(139,92,246,0.06);
    color: #a78bfa;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Sukar', sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.auth-btn-ghost:hover {
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.5);
    color: #c4b5fd;
    text-decoration: none;
}

/* ============================================================
   PROFILE COMPLETION POPUP MODAL
   ============================================================ */
.profile-complete-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.profile-complete-modal[hidden] { display: none !important; }

.profile-complete-card {
    background: linear-gradient(145deg, rgba(13,17,34,0.97) 0%, rgba(20,27,50,0.97) 100%);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 24px;
    padding: 36px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.1);
    position: relative;
}

/* ---- SVG Ring ---- */
.profile-complete-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}
.profile-complete-ring-svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}
.profile-complete-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 10;
}
.profile-complete-ring-fill {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.profile-complete-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-complete-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 8px;
}
.profile-complete-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    font-family: 'Sukar', sans-serif;
}
.profile-complete-fields {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: start;
}
.profile-complete-fields li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-family: 'Sukar', sans-serif;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.profile-complete-fields li:last-child { border-bottom: none; }
.pcf-icon { color: #06b6d4; font-size: 0.75rem; }

.profile-complete-cta {
    display: flex;
    gap: 10px;
    flex-direction: column;
}
.profile-complete-cta .btn-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-family: 'Sukar', sans-serif;
}
.profile-complete-cta .btn-fill:hover { opacity: 0.88; text-decoration: none; color: #fff; }
.profile-complete-cta .btn-later {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #475569;
    padding: 11px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-family: 'Sukar', sans-serif;
}
.profile-complete-cta .btn-later:hover { color: #64748b; border-color: rgba(255,255,255,0.12); }

/* ============================================================
   OTP CELL STYLES
   ============================================================ */
.otp-fields-new {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
    margin: 24px 0;
}
.otp-cell {
    width: 52px;
    height: 60px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    font-family: 'Space Grotesk', monospace;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.otp-cell:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25), 0 0 16px rgba(6, 182, 212, 0.2);
}
.otp-cell.otp-filled {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(139,92,246,0.08);
}

/* Resend button styled for cyberpunk dark theme */
.auth-resend-btn {
    background: none;
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 8px;
    color: #8b5cf6;
    padding: 7px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Sukar', sans-serif;
}
.auth-resend-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-resend-btn:not(:disabled):hover {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.6);
}
.auth-resend-timer {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.875rem;
    color: #475569;
    display: flex;
    align-items: center;
}

/* ============================================================
   RESPONSIVE — Profile pages (mobile only, desktop untouched)
   ============================================================ */
@media (max-width: 768px) {
    .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
    #profileGrid {
        grid-template-columns: 1fr;
        width: 100%;
        box-sizing: border-box;
    }
    .edit-profile-layout {
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }
    .edit-profile-sidebar { position: static; width: 100%; box-sizing: border-box; }
    .edit-form-grid { grid-template-columns: 1fr; width: 100%; }
    .achievements-grid { grid-template-columns: repeat(2, 1fr); width: 100%; }
    .otp-cell {
        flex: 1 1 auto;
        min-height: 52px;
        font-size: 1.2rem;
    }
    .profile-complete-card {
        padding: 28px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        isolation: isolate !important;
        will-change: auto !important;
    }
    #nameRow { grid-template-columns: 1fr; }
    #pwdRow  { grid-template-columns: 1fr; }
}
/* rusty end new code | 2026-08-25 01:06 */

/* ============================================================
   rusty begin new code | 2026-08-29 21:10
   Action: Deep mobile optimization for /profile and /profile/edit.
   Desktop rules above are untouched — everything here is scoped to
   max-width:768px per the project's viewport-isolation rule. Includes
   Android-specific tuning (GPU/backdrop-filter compositing sandbox per
   the K.I.S.S. mobile rule, tap-highlight cleanup, 16px form fields to
   stop mobile browsers zooming the viewport on focus).
   ============================================================ */
@media (max-width: 768px) {

    /* ---- #profileGrid carries an inline style="grid-template-columns:1fr 1fr"
       on the element itself. Inline styles always outrank a plain #id rule in
       a stylesheet (specificity aside, media-query scoping doesn't change
       that), so the existing rule above this block was never actually able
       to win on a real phone — !important is required here. */
    #profileGrid {
        grid-template-columns: 1fr !important;
    }

    .profile-page-wrap {
        padding-inline: 14px;
    }

    /* ---- Profile identity row: on desktop this is one unwrapped flex row
       (110px avatar + name text + a 44px edit button) fighting for space.
       That overflows well before a typical 360-412px Android width. Stack
       the row above the button instead. This element also carries
       backdrop-filter:blur (the leftover duplicate definition around line
       1520 adds it) — sandbox its own compositing layer so the glow below
       doesn't trigger a repaint storm against the glass background on
       Android Chromium. */
    .profile-identity {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 0 16px 18px;
        isolation: isolate !important;
        will-change: auto !important;
    }

    /* The avatar+name pair is an inline-styled row (display:flex;
       align-items:flex-end;gap:18px) with no room to breathe once it's the
       only thing sharing the row with an edit button below it — that's the
       "name touching the image" complaint. Stack the avatar centered above
       the name instead of beside it, with real vertical gaps between every
       piece, and give it a static (non-animated, so no continuous
       repaint cost) layered neon glow for a more "gaming" look. */
    #profileIdentity > div:first-child {
        flex-direction: column;
        align-items: center !important;
        gap: 16px;
    }

    .profile-avatar-ring {
        width: 96px;
        height: 96px;
        margin-top: -48px;
        box-shadow:
            0 0 0 4px rgba(13, 15, 26, 0.92),
            0 0 22px rgba(139, 92, 246, 0.55),
            0 0 40px rgba(6, 182, 212, 0.3);
        isolation: isolate !important;
        will-change: auto !important;
    }

    .profile-name-block {
        text-align: center;
    }

    .profile-name-block > div:last-child {
        justify-content: center;
    }

    .profile-username {
        font-size: 1.2rem;
        overflow-wrap: break-word;
    }

    .profile-handle {
        overflow-wrap: break-word;
    }

    /* ---- Glass cards use backdrop-filter and are GSAP-animated on load;
       sandbox their own compositing layer so Android Chromium doesn't
       repaint-storm the blur while the entrance animation runs. */
    .profile-stat-card {
        padding: 14px 10px;
        isolation: isolate !important;
        will-change: auto !important;
    }

    .profile-stat-value {
        font-size: 1.2rem;
    }

    .profile-section-card {
        padding: 18px 16px;
        isolation: isolate !important;
        will-change: auto !important;
    }

    .profile-completion-banner {
        padding: 12px 14px;
        gap: 10px;
    }

    /* ---- Achievement grid is already fluid (auto-fill/minmax) so it can't
       overflow, but the desktop 90px minimum only fits 2-up on a phone.
       Shrink the minimum + icon so 3 fit per row. */
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 12px;
    }

    .achievement-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .achievement-name {
        font-size: 0.625rem;
    }

    /* ---- Info/Activity/Training rows: let the value wrap to its own line
       instead of overflowing (long emails, long course titles). */
    .profile-activity-item {
        flex-wrap: wrap;
    }

    #profileInfoCard .profile-activity-item span:last-child {
        word-break: break-word;
        margin-inline-start: 28px;
    }

    /* ---- Android/Chrome shows a grey tap-highlight flash on custom glass
       buttons that looks broken against the gradient fill — disable it,
       the existing :hover/:active states already give tap feedback. */
    .profile-edit-btn,
    .profile-completion-cta-link,
    .achievement-badge {
        -webkit-tap-highlight-color: transparent;
    }

    /* ================= Edit Profile page ================= */

    /* ---- Root cause of the sidebar/main showing side-by-side on mobile ----
       This file has a second, unscoped, later definition of every
       .edit-profile-* class (around line 1762+) that switches this element
       to display:grid with a fixed 230px sidebar column — that later rule
       always wins over the earlier flex-based one regardless of viewport,
       and flex-direction:column (the earlier mobile fix) does nothing on a
       grid container. Force it back to a plain block so the two children
       stack top-to-bottom; grid-template-columns becomes irrelevant once
       display isn't grid, so nothing else needs to change here. */
    .edit-profile-layout {
        display: block;
        padding: 0 14px 40px;
    }

    .edit-profile-main {
        margin-top: 16px;
    }

    /* Sidebar becomes a horizontal scroll-snap tab strip instead of a tall
       vertical list that pushes every form field below the fold. */
    .edit-profile-sidebar {
        padding: 14px 12px;
        isolation: isolate !important;
        will-change: auto !important;
    }

    .edit-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .edit-sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .edit-sidebar-link {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 10px 14px;
        -webkit-tap-highlight-color: transparent;
    }

    /* The lone bare <div> between the section links and "View my profile"
       is a horizontal divider line built for the vertical list (full width,
       1px tall). Under the row layout above it becomes a flex item with no
       explicit width, rendering as a stray near-invisible sliver. Turn it
       into a proper vertical separator between the two tab groups instead. */
    .edit-sidebar-nav > div {
        width: 1px;
        height: auto;
        align-self: stretch;
        flex-shrink: 0;
        margin: 0 4px;
    }

    .edit-profile-main-title {
        font-size: 1.4rem;
    }

    /* Real height here is 160px (the second, later definition around line
       1855 wins over the 180px one near this file's top) — trim it down a
       bit further for mobile. Its avatar overlap is only 70px/-28px, well
       inside the existing 60px margin-bottom reserved beneath the zone, so
       that math doesn't need touching. */
    .edit-cover-zone {
        height: 130px;
    }

    .edit-form-section {
        padding: 18px 14px;
        isolation: isolate !important;
        will-change: auto !important;
    }

    /* Bump form fields to 16px — some Android WebViews/Samsung Internet
       builds still zoom the viewport on focus below that size. No visual
       change beyond the font size itself. */
    .auth-input,
    .auth-select,
    .auth-textarea {
        font-size: 16px;
    }

    .platform-chip {
        padding: 11px 12px;
        -webkit-tap-highlight-color: transparent;
    }

    /* This bar is a position:sticky bottom footer (the later, real definition
       around line 1954), so stacking two full-width buttons would make a
       persistently-visible footer unnecessarily tall. Keep them in a row
       but split the space evenly instead of leaving both at a thin
       auto-width. flex-basis:0 takes over sizing from the inline width:auto
       automatically (no !important needed) — flex-basis wins over width
       whenever it isn't auto. */
    .edit-save-bar {
        padding: 12px 14px;
        gap: 10px;
    }

    .edit-save-bar a,
    .edit-save-bar button {
        flex: 1 1 0;
        justify-content: center;
    }

    .auth-btn-primary,
    .auth-btn-ghost {
        -webkit-tap-highlight-color: transparent;
    }

    /* edit_profile.blade.php's own @section('style') block already skins
       Select2's height/colors/line-height with !important (same specificity,
       later in the cascade than this file, so it always wins regardless of
       viewport) — only add what that block doesn't already cover, instead
       of fighting it. */
    .select2-container {
        width: 100% !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 16px;
    }

    .select2-results__option {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    /* Platform+tag row: select + input + remove button side by side is too
       tight on a phone; stack the two fields and let the remove button sit
       at the row's end on its own line. */
    .gaming-tag-row {
        flex-wrap: wrap;
    }
    .gaming-tag-row .auth-select,
    .gaming-tag-row .auth-input {
        flex: 1 1 100%;
    }

    .privacy-toggles-grid {
        grid-template-columns: 1fr;
    }
    .privacy-toggle-row:nth-last-child(2) {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .privacy-toggle-row:last-child {
        border-bottom: none;
    }
}
/* rusty end new code | 2026-08-29 21:10 */


/* ============================================================
   12. INLINE FIELD VALIDATION  (rusty begin new code | 2026-09-15 23:11)
   Action: Per-field error + hint for the profile handle. Reuses the same red as
   .auth-alert-error above and the #94a3b8 muted grey already used throughout
   this file, so no new colours enter the palette.
   ============================================================ */
.auth-field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 2px 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fca5a5;
    line-height: 1.5;
}

.auth-field-error i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.auth-field-hint {
    margin: 6px 2px 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.5;
}

.auth-input--invalid {
    border-color: rgba(239, 68, 68, 0.55) !important;
}

.auth-input--invalid:focus {
    border-color: rgba(239, 68, 68, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
/* rusty end new code */
