/* =========================
   PROFILE SCREEN
========================= */

.profile-screen {
    position: absolute;
    inset: 0;

    overflow-y: auto;

    padding: 20px;

    background:
        radial-gradient(
            circle at top,
            rgba(59, 130, 246, 0.12),
            transparent 30%
        ),
        #09103f;

    font-family: "Inter", sans-serif;

    color: white;

    background-color: #09103f;
    background-image: url("/client/assets/images/bg/profile_bg_portrait.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (orientation: landscape) {
    .profile-screen {
        background-image: url("/client/assets/images/bg/profile_bg_landscape.jpg");
    }
}
/* =========================
   TOPBAR
========================= */

.profile-topbar {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 26px;
}

.profile-back-btn {
    width: 42px;
    height: 42px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14),
        rgba(255, 255, 255, 0.05)
    );

    color: white;

    font-size: 20px;
    cursor: pointer;

    backdrop-filter: blur(10px);

    transition:
        transform 0.18s ease,
        background 0.2s ease;
}

.profile-back-btn:hover {
    transform: translateY(-2px);

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.08)
    );
}

.profile-back-btn:active {
    transform: scale(0.95);
}

.profile-topbar-title {
    font-size: 24px;
    font-weight: 700;

    font-family: "Sora", sans-serif;
}

/* =========================
   PROFILE CARD
========================= */

.profile-card {
    position: relative;

    padding: 28px 24px;

    border-radius: 24px;

    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.04)
    );

    backdrop-filter: blur(14px);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);

    text-align: center;

    margin-bottom: 28px;

    overflow: hidden;
}

.profile-card::before {
    content: "";

    position: absolute;

    top: -60px;
    right: -60px;

    width: 160px;
    height: 160px;

    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.3),
        transparent 70%
    );

    pointer-events: none;
}

.profile-avatar {
    width: 88px;
    height: 88px;

    margin: 0 auto 18px auto;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
    font-weight: 700;

    background: linear-gradient(135deg, #3b82f6, #2563eb);

    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;

    margin-bottom: 6px;

    font-family: "Sora", sans-serif;
}

.profile-email {
    color: rgba(255, 255, 255, 0.7);

    font-size: 14px;
}

/* =========================
   SETTINGS LIST
========================= */

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 18px;

    border-radius: 18px;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.03)
    );

    border: 1px solid rgba(255, 255, 255, 0.06);

    backdrop-filter: blur(10px);

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background 0.2s ease,
        border 0.2s ease;
}

.profile-item:hover {
    transform: translateY(-2px);

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.05)
    );

    border-color: rgba(255, 255, 255, 0.14);
}

.profile-item:active {
    transform: scale(0.98);
}

.profile-item-left {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 16px;
    font-weight: 600;
}

.profile-icon {
    font-size: 22px;
}

.profile-arrow {
    font-size: 24px;

    color: rgba(255, 255, 255, 0.5);

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.profile-item:hover .profile-arrow {
    transform: translateX(4px);

    color: white;
}

/* =========================
   LOGOUT
========================= */

.profile-item.logout {
    border-color: rgba(255, 90, 95, 0.18);
}

.profile-item.logout:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 90, 95, 0.14),
        rgba(255, 90, 95, 0.05)
    );
}

/* =========================
   MOBILE
========================= */

@media (max-width: 500px) {
    .profile-screen {
        padding: 18px;
    }

    .profile-card {
        padding: 24px 20px;
    }

    .profile-name {
        font-size: 22px;
    }

    .profile-item {
        padding: 16px;
    }
}

/* =========================
   AVATAR WRAPPER
========================= */

.profile-avatar-wrapper {
    position: relative;

    width: fit-content;

    margin: 0 auto 18px auto;
}

/* =========================
   AVATAR IMAGE
========================= */

.profile-avatar-image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}

/* =========================
   CAMERA BUTTON
========================= */

.profile-camera-btn {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: linear-gradient(135deg, #ef4444, #dc2626);

    color: white;

    font-size: 16px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);

    transition:
        transform 0.18s ease,
        opacity 0.2s ease;
}

.profile-camera-btn:hover {
    transform: scale(1.08);
}

.profile-camera-btn:active {
    transform: scale(0.95);
}
.profile-photo-options {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 18px;
}

.photo-option-btn {
    border: none;

    border-radius: 14px;

    padding: 14px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    background: #1f2b57;

    color: white;

    transition: 0.2s ease;
}

.photo-option-btn:hover {
    transform: translateY(-1px);

    background: #2a3970;
}

.remove-photo {
    background: #7f1d1d;
}

.remove-photo:hover {
    background: #991b1b;
}
/* =========================
   PROFILE PHOTO POPUP
========================= */

.profile-photo-popup-overlay {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);

    backdrop-filter: blur(6px);
}

.profile-photo-popup {
    position: relative;

    width: 100%;
    max-width: 320px;

    padding: 24px 20px;

    border-radius: 24px;

    background: linear-gradient(145deg, #111b46, #0b1335);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);

    animation: profilePopupIn 0.18s ease;
}

.profile-popup-title {
    color: green;
    text-align: center;

    font-size: 20px;
    font-weight: 700;

    margin-bottom: 18px;

    font-family: "Sora", sans-serif;
}

.profile-popup-close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);

    color: white;

    font-size: 16px;

    cursor: pointer;
}

.profile-popup-btn {
    width: 100%;

    border: none;
    border-radius: 16px;

    padding: 15px;

    margin-top: 12px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);

    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.2s ease;
}

.profile-popup-btn:hover {
    transform: translateY(-2px);
}

.profile-popup-btn:active {
    transform: scale(0.98);
}

.remove-photo-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

@keyframes profilePopupIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* =========================
   AVATAR PICKER
========================= */

.avatar-picker-overlay {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(6px);
}

.avatar-picker-modal {
    position: relative;

    width: min(430px, 100%);

    max-height: 85vh;

    overflow-y: auto;

    padding: 22px;

    border-radius: 24px;

    background: linear-gradient(145deg, #111936, #18244f);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.avatar-picker-title {
    color: white;
    text-align: center;

    font-size: 22px;
    font-weight: 700;

    margin-bottom: 20px;

    font-family: "Sora", sans-serif;
}

.avatar-picker-close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);

    color: white;

    cursor: pointer;

    font-size: 15px;
}

.avatar-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.avatar-option {
    border: none;

    border-radius: 18px;

    overflow: hidden;

    padding: 0;

    cursor: pointer;

    background: rgba(255, 255, 255, 0.05);

    transition:
        transform 0.18s ease,
        border 0.2s ease;

    border: 2px solid transparent;
}

.avatar-option:hover {
    transform: scale(1.04);

    border-color: rgba(59, 130, 246, 0.7);
}

.avatar-option-image {
    width: 100%;

    display: block;

    aspect-ratio: 1;

    object-fit: cover;
}
