/* ==========================================================================
   04. Profile pages
   ========================================================================== */

.profile-v2-page {
    padding-bottom: 90px;
}

.profile-v2-hero {
    position: relative;
    margin-bottom: 34px;
}

.profile-v2-banner-wrap {
    position: relative;
    height: 420px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.profile-v2-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-v2-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(8, 9, 13, 0.12), rgba(8, 9, 13, 0.62)),
        linear-gradient(to top, rgba(8, 9, 13, 0.75), rgba(8, 9, 13, 0.05));
}

.profile-v2-topcard {
    position: relative;
    margin-top: -95px;
    z-index: 2;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(12, 14, 19, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.profile-v2-avatar-col {
    display: flex;
    justify-content: center;
}

.profile-v2-avatar-wrap {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.profile-v2-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-v2-main-col h1 {
    margin: 0 0 12px;
    font-size: 46px;
    line-height: 1.02;
    letter-spacing: -1.4px;
}

.profile-v2-username {
    margin: 0 0 10px;
    color: #f7c9de;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-v2-bio {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
    font-size: 16px;
}

.profile-v2-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-v2-meta-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.profile-v2-meta-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.profile-v2-meta-value {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.profile-v2-action-col {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.profile-v2-content {
    position: relative;
}

.profile-v2-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-v2-sidebar,
.profile-v2-main {
    display: grid;
    gap: 24px;
}

.profile-v2-panel {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.profile-v2-panel-head {
    margin-bottom: 18px;
}

.profile-v2-panel-head h2 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.6px;
}

.profile-v2-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.profile-v2-wallet-panel {
    background:
        radial-gradient(circle at top right, rgba(255, 79, 163, 0.12), transparent 30%),
        radial-gradient(circle at bottom left, rgba(123, 97, 255, 0.12), transparent 30%),
        rgba(255, 255, 255, 0.06);
}

.profile-v2-balance-box {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    margin-bottom: 16px;
}

.profile-v2-balance-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.profile-v2-balance-value {
    display: block;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -1.2px;
    margin-bottom: 8px;
}

.profile-v2-balance-note {
    display: block;
    color: #f3c7dc;
    font-size: 14px;
}

.profile-v2-mini-stats {
    display: grid;
    gap: 12px;
}

.profile-v2-mini-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.profile-v2-mini-stat span {
    color: var(--muted);
    font-size: 14px;
}

.profile-v2-mini-stat strong {
    font-size: 16px;
}

.profile-v2-action-list {
    display: grid;
    gap: 12px;
}

.profile-v2-action-item {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    transition: 0.2s ease;
}

.profile-v2-action-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.profile-v2-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-v2-detail-card,
.profile-v2-presence-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.profile-v2-detail-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.profile-v2-detail-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.profile-v2-about-box {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    line-height: 1.8;
    min-height: 120px;
}

.profile-v2-presence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.profile-v2-presence-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-v2-presence-card strong {
    font-size: 28px;
    letter-spacing: -0.8px;
}

.profile-v2-presence-card span {
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .profile-v2-grid {
        grid-template-columns: 1fr;
    }

    .profile-v2-sidebar {
        order: 2;
    }

    .profile-v2-main {
        order: 1;
    }

    .profile-v2-topcard {
        grid-template-columns: 140px 1fr;
    }

    .profile-v2-action-col {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .profile-v2-avatar-wrap {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 768px) {
    .profile-v2-banner-wrap {
        height: 300px;
    }

    .profile-v2-topcard {
        margin-top: -60px;
        grid-template-columns: 1fr;
        text-align: center;
        padding: 22px;
    }

    .profile-v2-avatar-wrap {
        width: 130px;
        height: 130px;
    }

    .profile-v2-main-col h1 {
        font-size: 34px;
    }

    .profile-v2-meta-row {
        justify-content: center;
    }

    .profile-v2-action-col {
        justify-content: center;
    }

    .profile-v2-details-grid,
    .profile-v2-presence-grid {
        grid-template-columns: 1fr;
    }

    .profile-v2-balance-value {
        font-size: 34px;
    }
}

.profile-v3-page {
    padding: 34px 20px 90px;
}

.profile-v3-hero {
    margin-bottom: 24px;
}

.profile-v3-shell {
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(255, 79, 163, 0.12), transparent 30%),
        radial-gradient(circle at bottom left, rgba(123, 97, 255, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(13, 15, 22, 0.72));
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.profile-v3-cover {
    position: relative;
    height: 300px;
}

.profile-v3-cover-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-v3-cover-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(8, 9, 13, 0.18), rgba(8, 9, 13, 0.56)),
        linear-gradient(to top, rgba(8, 9, 13, 0.85), rgba(8, 9, 13, 0.08));
}

.profile-v3-hero-card {
    position: relative;
    margin-top: -84px;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    gap: 24px;
    align-items: stretch;
    padding: 0 32px 32px;
}

.profile-v3-identity {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(12, 15, 22, 0.92), rgba(12, 15, 22, 0.74));
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
}

.profile-v3-avatar-shell {
    width: 160px;
    height: 160px;
    border-radius: 34px;
    overflow: hidden;
    border: 4px solid rgba(10, 12, 18, 0.9);
    background: rgba(10, 12, 18, 0.82);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.profile-v3-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-v3-copy {
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.profile-v3-kicker,
.profile-v3-section-kicker {
    margin: 0;
    color: #f7c9de;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.profile-v3-copy h1 {
    margin: 0;
    font-size: 52px;
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.profile-v3-bio {
    margin: 4px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.profile-v3-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.profile-v3-highlight-column {
    display: grid;
    gap: 14px;
    align-content: stretch;
}

.profile-v3-highlight-card,
.profile-v3-highlight-mini {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(13, 16, 24, 0.9), rgba(13, 16, 24, 0.76));
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
}

.profile-v3-highlight-card {
    display: grid;
    gap: 12px;
    padding: 24px;
    align-content: start;
    min-height: 100%;
}

.profile-v3-highlight-card span,
.profile-v3-highlight-mini span,
.profile-v3-stat-card span,
.profile-v3-detail-card span {
    color: #d7dfed;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.profile-v3-highlight-card strong {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.05em;
    word-break: break-word;
}

.profile-v3-highlight-card em {
    color: #f3c7dc;
    font-size: 14px;
    font-style: normal;
}

.profile-v3-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-v3-highlight-mini {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.profile-v3-highlight-mini strong {
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    word-break: break-word;
}

.profile-v3-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: start;
}

.profile-v3-main-column {
    display: grid;
    gap: 24px;
}

.profile-v3-side-column {
    display: grid;
    gap: 24px;
}

.profile-v3-panel {
    padding: 26px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(14, 17, 25, 0.92), rgba(11, 14, 21, 0.84));
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
}

.profile-v3-panel-head,
.profile-v3-panel-head-spread {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-v3-panel-head h2,
.profile-v3-panel-head-spread h2 {
    margin: 6px 0 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.profile-v3-panel-note {
    margin: 0;
    max-width: 320px;
    color: var(--muted);
    line-height: 1.6;
    text-align: right;
}

.profile-v3-panel-copy {
    margin: 10px 0 0;
    max-width: 56ch;
    color: #d1d7e4;
    line-height: 1.7;
}

.profile-v3-stat-grid,
.profile-v3-detail-grid {
    display: grid;
    gap: 14px;
}

.profile-v3-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.profile-v3-stat-card,
.profile-v3-detail-card,
.profile-v3-toggle-card,
.profile-v3-action-item {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-v3-stat-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    min-height: 112px;
    align-content: end;
}

.profile-v3-stat-card strong {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.05em;
    word-break: break-word;
}

.profile-v3-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-v3-detail-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    min-height: 108px;
    align-content: end;
}

.profile-v3-detail-card strong {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.profile-v3-detail-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.profile-v3-controls-panel {
    display: grid;
    gap: 18px;
}

.profile-v3-visibility-form {
    display: grid;
    gap: 14px;
}

.profile-v3-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
}

.profile-v3-toggle-copy {
    display: grid;
    gap: 6px;
}

.profile-v3-toggle-copy strong {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.profile-v3-toggle-switch {
    position: relative;
    width: 64px;
    height: 36px;
    flex: 0 0 auto;
}

.profile-v3-toggle-switch input {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-v3-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-v3-toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease;
}

.profile-v3-toggle-switch input:checked + .profile-v3-toggle-slider {
    background: linear-gradient(135deg, rgba(255, 79, 163, 0.9), rgba(123, 97, 255, 0.9));
    border-color: transparent;
}

.profile-v3-toggle-switch input:checked + .profile-v3-toggle-slider::before {
    transform: translateX(28px);
}

.profile-v3-action-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.profile-v3-follow-list {
    display: grid;
    gap: 14px;
}

.profile-v3-follow-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.profile-v3-follow-avatar-link {
    display: inline-flex;
}

.profile-v3-follow-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-v3-follow-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.profile-v3-follow-copy strong,
.profile-v3-follow-copy strong a {
    color: #fff;
}

.profile-v3-follow-copy span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.profile-v3-action-item {
    display: grid;
    gap: 0;
    padding: 20px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    min-width: 0;
    min-height: 0;
    align-content: start;
    align-items: center;
}

.profile-v3-action-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.profile-v3-action-item strong {
    font-size: 16px;
    letter-spacing: -0.02em;
    line-height: 1.3;
    word-break: break-word;
}

.data-export-v1-page {
    display: grid;
    gap: 24px;
}

.data-export-v1-hero .profile-v3-stat-grid {
    margin-bottom: 0;
}

.data-export-v1-download-form {
    display: grid;
    gap: 12px;
}

.data-export-v1-history-list {
    grid-template-columns: 1fr;
}

.data-export-v1-history-item {
    gap: 8px;
    align-items: start;
}

.data-export-v1-history-item span,
.data-export-v1-history-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.data-export-v1-history-item p {
    margin: 0;
    color: #d1d7e4;
    line-height: 1.7;
}

.profile-v3-requests {
    margin-top: 0;
}

@media (max-width: 1100px) {
    .profile-v3-hero-card,
    .profile-v3-grid {
        grid-template-columns: 1fr;
    }

    .profile-v3-highlight-column {
        max-width: 520px;
    }

    .profile-v3-stat-grid,
    .profile-v3-action-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .data-export-v1-history-list {
        grid-template-columns: 1fr;
    }

    .profile-v3-follow-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .profile-v3-follow-item .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .profile-v3-page {
        padding: 24px 12px 80px;
    }

    .profile-v3-cover {
        height: 220px;
    }

    .profile-v3-hero-card {
        margin-top: -52px;
        padding: 0 18px 18px;
        gap: 18px;
    }

    .profile-v3-identity {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .profile-v3-avatar-shell {
        width: 124px;
        height: 124px;
        border-radius: 28px;
    }

    .profile-v3-copy {
        padding-top: 0;
    }

    .profile-v3-copy h1 {
        font-size: 38px;
    }

    .profile-v3-highlight-grid,
    .profile-v3-stat-grid,
    .profile-v3-detail-grid,
    .profile-v3-action-list {
        grid-template-columns: 1fr;
    }

    .profile-v3-panel,
    .profile-v3-highlight-card,
    .profile-v3-highlight-mini {
        padding-left: 20px;
        padding-right: 20px;
    }

    .profile-v3-panel {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .profile-v3-panel-head,
    .profile-v3-panel-head-spread {
        align-items: start;
        flex-direction: column;
    }

    .profile-v3-panel-note {
        max-width: none;
        text-align: left;
    }

    .profile-v3-toggle-card {
        align-items: start;
        flex-direction: column;
    }

    .profile-v3-action-item {
        min-height: 0;
    }
}
