.pc-page-wrap {
    padding: 1rem 1rem 4rem;
    max-width: 560px;
    margin: 0 auto;
}

.profile-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

/* ─── Header: Avatar + Name ─── */
.pc-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    padding: 1.8rem 1.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.pc-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.pc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-name-block {
    flex: 1;
    min-width: 0;
}

.pc-name {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-level-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.22rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── XP Block ─── */
.pc-xp-block {
    padding: 1.2rem 1.6rem 1.1rem;
    background: #f0f6ff;
    border-bottom: 1px solid #e5e7eb;
}

.pc-xp-labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}

.pc-xp-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #1e40af;
}

.pc-xp-total {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

.pc-xp-track {
    height: 11px;
    background: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.55rem;
}

.pc-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e40af, #3b82f6, #60a5fa);
    border-radius: 999px;
    transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
    min-width: 0;
}

.pc-xp-sublevel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.pc-xp-sublevel-dots {
    display: flex;
    gap: 4px;
}

.pc-sub-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bfdbfe;
    transition: background 0.2s;
}

.pc-sub-dot.filled {
    background: #1e40af;
}

.pc-xp-next {
    font-size: 0.74rem;
    color: #93c5fd;
    font-weight: 600;
    text-align: right;
}

/* ─── Top Categories ─── */
.pc-top-cats {
    padding: 1.1rem 1.6rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.pc-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.9rem;
}

.pc-cat-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.pc-cat-row:last-child {
    margin-bottom: 0;
}

.pc-cat-rank {
    font-size: 1rem;
    width: 1.5rem;
    flex-shrink: 0;
    text-align: center;
}

.pc-cat-icon {
    font-size: 0.95rem;
    width: 1.1rem;
    flex-shrink: 0;
    text-align: center;
}

.pc-cat-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #374151;
    width: 5.2rem;
    flex-shrink: 0;
}

.pc-cat-bar-wrap {
    flex: 1;
    height: 9px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.pc-cat-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 0;
}

.pc-cat-pts {
    font-size: 0.82rem;
    font-weight: 700;
    width: 4.5rem;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.pc-no-cats {
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
    padding: 0.6rem 0;
}

/* ─── Stats Row ─── */
.pc-stats-row {
    display: flex;
    align-items: stretch;
    padding: 1rem 1rem 1.1rem;
}

.pc-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
}

.pc-stat-divider {
    width: 1px;
    background: #e5e7eb;
    margin: 0.3rem 0;
    align-self: stretch;
    flex-shrink: 0;
}

.pc-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.pc-stat-label {
    font-size: 0.67rem;
    color: #9ca3af;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pc-login-hint {
    text-align: center;
    color: #6b7280;
    padding: 3rem 1rem;
    font-size: 1rem;
}

.pc-login-hint a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
}

/* ─── Skeleton ─── */
.pc-skel-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    padding: 1.8rem 1.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.pc-skel-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.35;
}

.pc-skel-name-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pc-skel-name {
    height: 1.3rem;
    width: 55%;
    border-radius: 6px;
    opacity: 0.35;
}

.pc-skel-badge {
    height: 0.85rem;
    width: 38%;
    border-radius: 999px;
    opacity: 0.25;
}

.pc-skel-xp {
    padding: 1.2rem 1.6rem 1.1rem;
    background: #f0f6ff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

[data-theme="dark"] .pc-skel-xp {
    background: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.pc-skel-xp-label { height: 1rem; width: 45%; border-radius: 6px; }
.pc-skel-xp-bar   { height: 11px; width: 100%; border-radius: 999px; }

.pc-skel-cats {
    padding: 1.1rem 1.6rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-theme="dark"] .pc-skel-cats { border-bottom-color: var(--secondary-color); }

/* ─── Dark Mode ─── */
[data-theme="dark"] .profile-card {
    background: var(--primary-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .pc-xp-block {
    background: #0f172a;
    border-bottom-color: var(--secondary-color);
}
[data-theme="dark"] .pc-xp-title { color: #93c5fd; }
[data-theme="dark"] .pc-xp-total { color: #9ca3af; }
[data-theme="dark"] .pc-xp-track { background: #1e3a5f; }
[data-theme="dark"] .pc-top-cats { border-bottom-color: var(--secondary-color); }
[data-theme="dark"] .pc-section-label { color: #6b7280; }
[data-theme="dark"] .pc-cat-label { color: #d1d5db; }
[data-theme="dark"] .pc-cat-bar-wrap { background: #1e293b; }
[data-theme="dark"] .pc-cat-pts { color: #d1d5db; }
[data-theme="dark"] .pc-stat-divider { background: var(--secondary-color); }
[data-theme="dark"] .pc-stat-value { color: #f3f4f6; }
[data-theme="dark"] .pc-stat-label { color: #6b7280; }
[data-theme="dark"] .pc-login-hint { color: #9ca3af; }
[data-theme="dark"] .pc-no-cats { color: #6b7280; }

.pc-skel-cat-row { height: 1.1rem; border-radius: 6px; }
.pc-skel-cat-row:nth-child(2) { width: 85%; }
.pc-skel-cat-row:nth-child(3) { width: 70%; }

.pc-skel-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 1rem 1.1rem;
    gap: 1rem;
}

.pc-skel-stat { height: 2rem; width: 4.5rem; border-radius: 6px; }

@media (max-width: 600px) {
    .pc-page-wrap { padding: 0.5rem 0.5rem 3rem; }
    .pc-header { padding: 1.4rem 1.2rem 1.2rem; }
    .pc-name { font-size: 1.2rem; }
    .pc-xp-block, .pc-top-cats { padding-left: 1.2rem; padding-right: 1.2rem; }
    .pc-stats-row { padding: 0.8rem 0.5rem 1rem; }
    .pc-stat-value { font-size: 1.2rem; }
}
