/* ============================================================
   PROFILE UI v2.0 - Premium responsive layout
   Chỉ thay đổi giao diện trang profile công khai, không đổi dữ liệu/chức năng.
   ============================================================ */

:root {
    --ui-bg-1: #06112f;
    --ui-bg-2: #071b47;
    --ui-panel: rgba(9, 27, 70, .76);
    --ui-panel-strong: rgba(8, 24, 63, .92);
    --ui-line: rgba(107, 174, 255, .20);
    --ui-line-strong: rgba(70, 216, 255, .42);
    --ui-text: #f6f9ff;
    --ui-muted: #9fb2da;
    --ui-blue: #3e8cff;
    --ui-cyan: #25d6ff;
    --ui-green: #36e68a;
    --ui-yellow: #ffd84d;
    --ui-danger: #ff4c63;
    --ui-radius-xl: 30px;
    --ui-radius-lg: 22px;
    --ui-radius-md: 16px;
    --ui-shadow: 0 24px 70px rgba(0, 0, 0, .30);
    --ui-shadow-soft: 0 14px 36px rgba(0, 0, 0, .20);
}

html, body { min-height: 100%; }

body {
    background:
        radial-gradient(circle at 14% 10%, rgba(42, 117, 255, .18), transparent 34%),
        radial-gradient(circle at 88% 22%, rgba(37, 214, 255, .12), transparent 30%),
        radial-gradient(circle at 50% 92%, rgba(80, 64, 255, .11), transparent 35%),
        linear-gradient(145deg, var(--ui-bg-1) 0%, #06163b 38%, var(--ui-bg-2) 100%) !important;
    background-attachment: fixed !important;
    animation: none !important;
    color: var(--ui-text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .55;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
}

.clouds-container { opacity: .62; }
.cloud { filter: blur(55px) !important; opacity: .65; }

.page {
    padding: 24px 22px 104px !important;
}

.container-profile {
    max-width: 1120px !important;
    width: min(1120px, 100%) !important;
}

/* ---------- Brand ---------- */
.top-brand {
    margin: 0 auto 18px !important;
    padding: 2px 12px;
}

.top-brand img {
    height: 58px !important;
    margin-bottom: 9px !important;
    filter: drop-shadow(0 0 16px rgba(37,214,255,.42)) !important;
}

.top-brand .title {
    max-width: 780px;
    margin: 0 auto;
    font-size: 14px !important;
    line-height: 1.45 !important;
    letter-spacing: .4px !important;
    color: #79bfff !important;
    text-shadow: 0 0 18px rgba(55,160,255,.26) !important;
}

/* ---------- Hero profile ---------- */
.profile-head {
    width: min(880px, 100%);
    margin: 0 auto 24px !important;
    padding: 26px 24px 24px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius-xl) !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(58, 151, 255, .17), transparent 42%),
        linear-gradient(145deg, rgba(12, 39, 94, .74), rgba(7, 22, 58, .76)) !important;
    box-shadow: var(--ui-shadow) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: visible !important;
}

.profile-head::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(110deg, rgba(255,255,255,.07), transparent 28%, transparent 72%, rgba(37,214,255,.045));
}

.avatar-wrapper {
    width: 150px !important;
    height: 150px !important;
}

.profile-name-wrap {
    margin-top: 2px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
}

.profile-name {
    font-size: clamp(24px, 2.5vw, 31px) !important;
    letter-spacing: -.35px;
    text-shadow: 0 2px 14px rgba(0,0,0,.48), 0 0 20px rgba(37,214,255,.20) !important;
}

.verified-badge,
.verified-badge img {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
}

.stats-wrapper {
    gap: 10px !important;
    margin-top: 2px !important;
    flex-wrap: wrap;
}

.stats-divider { display: none !important; }

.stats-item {
    min-height: 38px;
    padding: 7px 16px !important;
    gap: 6px !important;
    border: 1px solid rgba(120, 173, 255, .22) !important;
    border-radius: 999px !important;
    background: rgba(5, 18, 49, .62) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.stats-item .number {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #fff !important;
}

.stats-item .label {
    font-size: 9px !important;
    letter-spacing: .35px !important;
    color: var(--ui-muted) !important;
}

.badge-group {
    margin-top: 11px !important;
    gap: 7px !important;
    flex-wrap: wrap !important;
}

.badge-group > span {
    min-height: 30px;
    padding: 6px 11px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    font-size: 11px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.badge-baoke {
    background: linear-gradient(135deg, rgba(255,195,35,.20), rgba(255,150,20,.10)) !important;
    color: #ffd85a !important;
    border-color: rgba(255,205,65,.25) !important;
}

.badge-dv {
    background: rgba(43,132,255,.14) !important;
    color: #78b8ff !important;
}

.badge-dv-all {
    background: rgba(130,152,203,.12) !important;
    color: #b8c6e7 !important;
}

.profile-buttons {
    margin-top: 15px !important;
    gap: 12px !important;
    justify-content: center !important;
}

.btn-linear {
    height: 48px !important;
    min-width: 210px !important;
    max-width: 260px !important;
    padding: 0 22px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: .05px;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.16) !important;
    transform: translateZ(0);
}

.btn-zalo { background: linear-gradient(135deg, #0879ff, #135bea) !important; }
.btn-telegram { background: linear-gradient(135deg, #27bff7, #188ee8) !important; }

.btn-linear:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.06) saturate(1.08);
    box-shadow: 0 16px 28px rgba(0,0,0,.25), 0 0 0 1px rgba(91,206,255,.20) !important;
}

/* ---------- Content cards ---------- */
.cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin-bottom: 18px !important;
}

.section-card {
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius-lg) !important;
    background:
        linear-gradient(145deg, rgba(11, 35, 83, .80), rgba(7, 24, 61, .78)) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 20px !important;
    margin-bottom: 18px !important;
    overflow: hidden !important;
}

.section-card::before {
    background: linear-gradient(135deg, rgba(37,214,255,.075), transparent 40%, rgba(61,113,255,.035)) !important;
}

.section-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(to bottom, #3b8cff, #25d6ff);
    opacity: .72;
}

.section-card:hover {
    transform: translateY(-3px) !important;
    border-color: var(--ui-line-strong) !important;
    box-shadow: 0 20px 45px rgba(0,0,0,.28), 0 0 0 1px rgba(37,214,255,.04) !important;
}

.section-card.compact {
    padding: 18px 20px !important;
}

.section-card__row {
    gap: 20px !important;
}

.section-card__image {
    width: 108px !important;
    min-width: 108px !important;
}

.section-card__image img {
    max-width: 92px !important;
    max-height: 92px !important;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.24)) drop-shadow(0 0 12px rgba(37,214,255,.10));
}

.section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px !important;
    font-size: 18px !important;
    letter-spacing: .15px;
    color: #56a1ff !important;
}

.section-title::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--ui-cyan);
    box-shadow: 0 0 12px rgba(37,214,255,.75);
}

.info-list { gap: 8px !important; }

.info-item,
.desc,
.simple-list li,
.bank-list li,
.profile-desc {
    font-size: 14px !important;
    line-height: 1.68 !important;
}

.info-item { gap: 9px !important; }
.info-icon { color: #8ec6ff !important; }
.info-item a { color: #58a7ff !important; }
.verified { color: var(--ui-green) !important; }

.simple-list li {
    padding-left: 20px !important;
    margin-bottom: 8px !important;
}

.simple-list li::before {
    content: "" !important;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    top: .72em !important;
    background: linear-gradient(135deg, #4c95ff, #25d6ff);
    box-shadow: 0 0 10px rgba(37,214,255,.35);
}

.bank-list li {
    padding: 10px 0 !important;
    border-bottom-color: rgba(148,179,235,.12) !important;
}

.bank-logo {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px;
    margin-top: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(76,149,255,.12);
    color: #83bcff !important;
}

.copy-btn {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin-left: 8px !important;
    border-radius: 8px;
    background: rgba(76,149,255,.11);
    color: #8cc4ff !important;
    transition: .2s ease;
}

.copy-btn:hover {
    color: #fff !important;
    background: rgba(37,214,255,.18);
    transform: translateY(-1px);
}

.profile-desc {
    width: min(840px, 100%);
    margin: 4px auto 4px !important;
    padding: 12px 16px;
    color: #aebfe3 !important;
}

/* ---------- Floating controls ---------- */
.scroll-top {
    width: 50px !important;
    height: 50px !important;
    right: 22px !important;
    bottom: 82px !important;
    border: 1px solid rgba(86,184,255,.62) !important;
    background: rgba(11,35,82,.88) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0,0,0,.30), 0 0 18px rgba(37,214,255,.15) !important;
    animation: none !important;
}

.mobile-footer {
    left: 50% !important;
    right: auto !important;
    bottom: 16px !important;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 30px)) !important;
    height: 52px !important;
    border-radius: 16px !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 42px rgba(0,0,0,.36) !important;
    background: rgba(7,20,52,.76);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.mobile-footer a {
    font-size: 13px !important;
    letter-spacing: .12px;
}

.mobile-footer .left { background: linear-gradient(135deg, #ff3434, #e51f3f) !important; }
.mobile-footer .right { background: linear-gradient(135deg, #168dff, #1db8ee) !important; }

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
    .page { padding: 18px 16px 94px !important; }
    .container-profile { max-width: 820px !important; }
    .profile-head { width: 100%; padding: 22px 18px 22px !important; }
    .avatar-wrapper { width: 132px !important; height: 132px !important; }
    .cards-grid { gap: 14px !important; }
    .section-card { padding: 17px !important; }
    .section-card__image { width: 82px !important; min-width: 82px !important; }
    .section-card__image img { max-width: 74px !important; max-height: 74px !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    body { background-attachment: scroll !important; }
    body::before { background-size: 30px 30px; opacity: .38; }
    .clouds-container { opacity: .42; }

    .page {
        padding: 12px 11px calc(88px + env(safe-area-inset-bottom)) !important;
    }

    .top-brand {
        margin-bottom: 10px !important;
    }

    .top-brand img {
        height: 42px !important;
        margin-bottom: 5px !important;
    }

    .top-brand .title {
        font-size: 10px !important;
        line-height: 1.45 !important;
        letter-spacing: .15px !important;
        padding: 0 4px;
    }

    .profile-head {
        padding: 18px 12px 16px !important;
        margin-bottom: 13px !important;
        border-radius: 22px !important;
        background:
            radial-gradient(circle at 50% 0%, rgba(58,151,255,.17), transparent 46%),
            linear-gradient(145deg, rgba(10,31,77,.88), rgba(6,20,53,.88)) !important;
    }

    .avatar-wrapper {
        width: 112px !important;
        height: 112px !important;
    }

    .profile-name-wrap { gap: 6px !important; margin-bottom: 8px !important; }
    .profile-name { font-size: 20px !important; line-height: 1.25 !important; max-width: calc(100% - 30px) !important; }
    .verified-badge, .verified-badge img { width: 20px !important; height: 20px !important; min-width: 20px !important; }

    .stats-wrapper {
        width: 100%;
        gap: 7px !important;
        padding: 0 2px;
    }

    .stats-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
        min-height: 36px;
        padding: 6px 8px !important;
    }

    .stats-item .number { font-size: 13px !important; }
    .stats-item .label { font-size: 8px !important; }

    .badge-group {
        gap: 5px !important;
        margin-top: 8px !important;
    }

    .badge-group > span {
        min-height: 26px;
        padding: 5px 8px !important;
        font-size: 9px !important;
    }

    .profile-buttons {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px !important;
        margin-top: 11px !important;
    }

    .btn-linear {
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: 42px !important;
        padding: 0 8px !important;
        border-radius: 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .cards-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
    }

    .section-card,
    .section-card.compact {
        padding: 15px 14px !important;
        margin-bottom: 11px !important;
        border-radius: 18px !important;
    }

    .section-card::after {
        top: 14px;
        bottom: 14px;
        width: 2px;
    }

    .section-card:hover { transform: none !important; }

    .section-card__row {
        gap: 10px !important;
        align-items: center !important;
    }

    .section-card__image {
        width: 58px !important;
        min-width: 58px !important;
    }

    .section-card__image img {
        max-width: 52px !important;
        max-height: 52px !important;
    }

    .section-title {
        font-size: 14px !important;
        margin-bottom: 9px !important;
        gap: 7px;
    }

    .section-title::before { width: 6px; height: 6px; flex-basis: 6px; }

    .info-item,
    .desc,
    .simple-list li,
    .bank-list li,
    .profile-desc {
        font-size: 12px !important;
        line-height: 1.62 !important;
    }

    .info-list { gap: 6px !important; }
    .info-icon { width: 16px !important; min-width: 16px !important; font-size: 12px !important; }

    .simple-list li { padding-left: 16px !important; margin-bottom: 6px !important; }
    .simple-list li::before { width: 6px; height: 6px; top: .7em !important; }

    .bank-list li { padding: 8px 0 !important; }
    .bank-logo { width: 24px !important; min-width: 24px !important; height: 24px; border-radius: 7px; }
    .copy-btn { width: 26px; height: 26px; }

    .profile-desc { padding: 8px 4px 2px !important; }

    .mobile-footer {
        width: calc(100% - 16px) !important;
        height: 50px !important;
        bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        border-radius: 14px !important;
    }

    .mobile-footer a { font-size: 11px !important; padding: 0 5px !important; }

    .scroll-top {
        width: 42px !important;
        height: 42px !important;
        right: 12px !important;
        bottom: calc(70px + env(safe-area-inset-bottom)) !important;
        font-size: 15px !important;
    }
}

@media (max-width: 380px) {
    .page { padding-left: 8px !important; padding-right: 8px !important; }
    .profile-head { padding-left: 9px !important; padding-right: 9px !important; }
    .avatar-wrapper { width: 100px !important; height: 100px !important; }
    .profile-name { font-size: 18px !important; }
    .btn-linear { font-size: 10.5px !important; }
    .section-card__image { display: none !important; }
    .stats-item .label { font-size: 7px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
    }
    .cloud, .profile-avatar, .section-card__image img, .verified-badge {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}
