/* Profile Popup Styles */

.profile-popup-overlay, .steam-profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(24, 26, 33, 0.85);
    backdrop-filter: blur(12px) saturate(1.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}


.steam-profile-popup, .profile-popup {
    background: rgba(34, 40, 49, 0.95);
    border-radius: 24px;
    width: 95vw;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 48px 0 rgba(0,0,0,0.55), 0 1.5px 8px 0 #fc9d0b44;
    border: 2.5px solid #fc9d0b;
    position: relative;
    animation: popupBounceIn 0.6s cubic-bezier(0.68,-0.55,0.265,1.55);
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.steam-profile-popup::-webkit-scrollbar, .profile-popup::-webkit-scrollbar {
    display: none;
}

.steam-profile-header {
    background: linear-gradient(135deg, #1a2332 0%, #5a3d1f 50%, #fc9d0b 100%);
    border-radius: 24px 24px 0 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    box-shadow: 0 8px 24px #fc9d0b33, inset 0 1px 0 rgba(255,255,255,0.1);
    background-attachment: fixed;
}

.profile-cover {
    width: 100%;
    padding: 2.2rem 2rem 1.2rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.profile-header-content {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.profile-avatar-section {
    position: relative;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

/* Avatar image container — matches full profile .profile-avatar */
.profile-avatar-wrap {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    border: 3px solid var(--accent-blue, #4fc3f7);
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 30px rgba(252, 157, 11, 0.3);
}

.profile-avatar-wrap .profile-avatar-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Frame overlay — matches full profile .avatar-frame (sits behind avatar) */
.profile-avatar-frame-overlay {
    position: absolute;
    inset: -8px;
    border-radius: 22px;
    pointer-events: none;
    z-index: 0;
}

/* Avatar Frame Styles — matching full profile enhanced frames */

/* ── Golden Crown ── */
.profile-avatar-frame-overlay.golden_crown {
    border: 4px solid #FFD700;
    box-shadow: 0 0 18px #FFD700, 0 0 40px rgba(255, 215, 0, 0.4), inset 0 0 12px rgba(255, 215, 0, 0.15);
    background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, transparent 50%, rgba(255,215,0,0.08) 100%);
    animation: golden-shimmer-p 4s ease-in-out infinite;
}
.profile-avatar-frame-overlay.golden_crown::before {
    content: '👑';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
    animation: crown-bob-p 2s ease-in-out infinite;
    z-index: 5;
}
@keyframes golden-shimmer-p {
    0%, 100% { box-shadow: 0 0 18px #FFD700, 0 0 40px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 28px #FFD700, 0 0 60px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 180, 0, 0.2); }
}
@keyframes crown-bob-p {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

/* ── Rainbow Glow ── */
.profile-avatar-frame-overlay.rainbow_glow {
    border: 4px solid;
    animation: rainbow-frame-popup 4s linear infinite;
    background: conic-gradient(from 0deg, rgba(255,0,0,0.06), rgba(255,165,0,0.06), rgba(255,255,0,0.06), rgba(0,255,0,0.06), rgba(0,0,255,0.06), rgba(128,0,255,0.06), rgba(255,0,0,0.06));
}
.profile-avatar-frame-overlay.rainbow_glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: conic-gradient(from 0deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0000);
    opacity: 0.25;
    filter: blur(8px);
    animation: rainbow-spin-p 6s linear infinite;
    z-index: -1;
}
@keyframes rainbow-frame-popup {
    0%   { border-color: #ff0000; box-shadow: 0 0 20px #ff0000, 0 0 50px rgba(255,0,0,0.3); }
    16%  { border-color: #ff8800; box-shadow: 0 0 20px #ff8800, 0 0 50px rgba(255,136,0,0.3); }
    33%  { border-color: #ffff00; box-shadow: 0 0 20px #cccc00, 0 0 50px rgba(204,204,0,0.3); }
    50%  { border-color: #00ff00; box-shadow: 0 0 20px #00ff00, 0 0 50px rgba(0,255,0,0.3); }
    66%  { border-color: #0088ff; box-shadow: 0 0 20px #0088ff, 0 0 50px rgba(0,136,255,0.3); }
    83%  { border-color: #8800ff; box-shadow: 0 0 20px #8800ff, 0 0 50px rgba(136,0,255,0.3); }
    100% { border-color: #ff0000; box-shadow: 0 0 20px #ff0000, 0 0 50px rgba(255,0,0,0.3); }
}
@keyframes rainbow-spin-p { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Neon Hex ── */
.profile-avatar-frame-overlay.neon_hex {
    border: 4px solid #00FFC6;
    box-shadow: 0 0 20px #00FFC6, 0 0 50px rgba(0, 255, 198, 0.35), inset 0 0 10px rgba(0, 255, 198, 0.1);
    animation: neon-flicker-p 3s ease-in-out infinite;
}
.profile-avatar-frame-overlay.neon_hex::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: repeating-conic-gradient(from 0deg, rgba(0,255,198,0.12) 0deg 30deg, transparent 30deg 60deg);
    animation: hex-rotate-p 10s linear infinite;
}
@keyframes neon-flicker-p {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        box-shadow: 0 0 20px #00FFC6, 0 0 50px rgba(0, 255, 198, 0.35);
    }
    20%, 24%, 55% {
        box-shadow: 0 0 5px #00FFC6, 0 0 15px rgba(0, 255, 198, 0.15);
    }
}
@keyframes hex-rotate-p { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Ice Crystal ── */
.profile-avatar-frame-overlay.ice_crystal {
    border: 4px solid #87CEFA;
    box-shadow: 0 0 20px #87CEFA, 0 0 45px rgba(135, 206, 250, 0.35);
    background: linear-gradient(135deg, rgba(135,206,250,0.1) 0%, transparent 40%, rgba(200,230,255,0.08) 100%);
    animation: ice-breath-p 5s ease-in-out infinite;
}
.profile-avatar-frame-overlay.ice_crystal::before {
    content: '❄';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 14px;
    opacity: 0.8;
    filter: drop-shadow(0 0 4px #87CEFA);
    animation: ice-sparkle-p 3s ease-in-out infinite;
}
.profile-avatar-frame-overlay.ice_crystal::after {
    content: '❄';
    position: absolute;
    bottom: -4px;
    left: -4px;
    font-size: 10px;
    opacity: 0.6;
    filter: drop-shadow(0 0 3px #87CEFA);
    animation: ice-sparkle-p 3s ease-in-out infinite 1.5s;
}
@keyframes ice-breath-p {
    0%, 100% { box-shadow: 0 0 20px #87CEFA, 0 0 45px rgba(135,206,250,0.35); }
    50% { box-shadow: 0 0 30px #87CEFA, 0 0 60px rgba(135,206,250,0.5), 0 0 80px rgba(180,220,255,0.15); }
}
@keyframes ice-sparkle-p {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
}

/* ── Fire Halo ── */
.profile-avatar-frame-overlay.fire_halo {
    border: 4px solid #FF4500;
    box-shadow: 0 0 20px #FF4500, 0 0 45px rgba(255, 69, 0, 0.4);
    animation: fire-pulse-popup 1.2s ease-in-out infinite;
    background: linear-gradient(0deg, rgba(255,69,0,0.12) 0%, transparent 50%);
}
.profile-avatar-frame-overlay.fire_halo::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    background: radial-gradient(ellipse at bottom, rgba(255,100,0,0.25), transparent 70%);
    filter: blur(4px);
    animation: fire-flare-p 2s ease-in-out infinite;
}
@keyframes fire-pulse-popup {
    0%, 100% { box-shadow: 0 0 20px #FF4500, 0 0 40px rgba(255, 69, 0, 0.4); border-color: #FF4500; }
    50% { box-shadow: 0 0 35px #FF6347, 0 0 65px rgba(255, 99, 71, 0.5), 0 0 90px rgba(255, 69, 0, 0.2); border-color: #FF6A3D; }
}
@keyframes fire-flare-p {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.15); }
}

/* ── Electric Ring ── */
.profile-avatar-frame-overlay.electric_ring {
    border: 4px solid #7DF9FF;
    box-shadow: 0 0 20px #7DF9FF, 0 0 50px rgba(125, 249, 255, 0.35);
    animation: electric-crackle-p 0.15s steps(2) infinite, electric-glow-p 3s ease-in-out infinite;
}
.profile-avatar-frame-overlay.electric_ring::before {
    content: '⚡';
    position: absolute;
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
    font-size: 12px;
    filter: drop-shadow(0 0 6px #7DF9FF);
    animation: spark-jump-p 2s ease-in-out infinite;
}
.profile-avatar-frame-overlay.electric_ring::after {
    content: '⚡';
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%) scaleX(-1);
    font-size: 12px;
    filter: drop-shadow(0 0 6px #7DF9FF);
    animation: spark-jump-p 2s ease-in-out infinite 1s;
}
@keyframes electric-crackle-p {
    0% { border-color: #7DF9FF; }
    50% { border-color: #B0FCFF; }
}
@keyframes electric-glow-p {
    0%, 100% { box-shadow: 0 0 20px #7DF9FF, 0 0 50px rgba(125,249,255,0.35); }
    50% { box-shadow: 0 0 35px #7DF9FF, 0 0 70px rgba(125,249,255,0.5); }
}
@keyframes spark-jump-p {
    0%, 40%, 60%, 100% { opacity: 0; }
    45%, 55% { opacity: 1; transform: translateY(-50%) scale(1.3); }
}

/* ── Shadow Void ── */
.profile-avatar-frame-overlay.shadow_void {
    border: 4px solid #4B0082;
    box-shadow: 0 0 25px #4B0082, 0 0 50px rgba(75, 0, 130, 0.45), inset 0 0 20px rgba(75, 0, 130, 0.2);
    background: radial-gradient(circle, transparent 50%, rgba(75, 0, 130, 0.15) 100%);
    animation: void-pulse-p 4s ease-in-out infinite;
}
.profile-avatar-frame-overlay.shadow_void::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 30%, rgba(128,0,255,0.15), transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(80,0,160,0.15), transparent 50%);
    animation: void-swirl-p 8s linear infinite;
    filter: blur(3px);
}
@keyframes void-pulse-p {
    0%, 100% { box-shadow: 0 0 25px #4B0082, 0 0 50px rgba(75,0,130,0.45); }
    50% { box-shadow: 0 0 35px #6A0DAD, 0 0 70px rgba(106,13,173,0.5), 0 0 100px rgba(75,0,130,0.2); }
}
@keyframes void-swirl-p { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Star Burst ── */
.profile-avatar-frame-overlay.star_burst {
    border: 4px solid #F0E68C;
    box-shadow: 0 0 20px #F0E68C, 0 0 45px rgba(240, 230, 140, 0.35);
    animation: star-twinkle-p 2s ease-in-out infinite;
}
.profile-avatar-frame-overlay.star_burst::before {
    content: '✦';
    position: absolute;
    top: -8px;
    left: -8px;
    font-size: 14px;
    color: #F0E68C;
    filter: drop-shadow(0 0 5px #F0E68C);
    animation: star-rotate-p 3s linear infinite;
}
.profile-avatar-frame-overlay.star_burst::after {
    content: '✦';
    position: absolute;
    bottom: -8px;
    right: -8px;
    font-size: 10px;
    color: #DAA520;
    filter: drop-shadow(0 0 4px #DAA520);
    animation: star-rotate-p 3s linear infinite reverse;
}
@keyframes star-twinkle-p {
    0%, 100% { box-shadow: 0 0 20px #F0E68C, 0 0 45px rgba(240,230,140,0.35); }
    25% { box-shadow: 0 0 30px #FFFACD, 0 0 55px rgba(255,250,205,0.45); }
    50% { box-shadow: 0 0 25px #F0E68C, 0 0 50px rgba(240,230,140,0.4); }
    75% { box-shadow: 0 0 32px #FFFACD, 0 0 60px rgba(255,250,205,0.5); }
}
@keyframes star-rotate-p { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Upside Vines ── */
.profile-avatar-frame-overlay.upside_vines {
    border: 4px solid #1a0a0a;
    box-shadow:
        0 0 25px rgba(139, 0, 0, 0.7),
        0 0 50px rgba(100, 0, 0, 0.4),
        inset 0 0 15px rgba(139, 0, 0, 0.3);
    position: relative;
    overflow: visible;
    background: radial-gradient(circle at center, transparent 60%, rgba(20, 10, 10, 0.4) 100%);
    animation: vines-flicker-p 6s ease-in-out infinite;
}
@keyframes vines-flicker-p {
    0%, 100% { box-shadow: 0 0 25px rgba(139,0,0,0.7), 0 0 50px rgba(100,0,0,0.4), inset 0 0 15px rgba(139,0,0,0.3); }
    30% { box-shadow: 0 0 30px rgba(180,0,0,0.8), 0 0 60px rgba(120,0,0,0.5), inset 0 0 20px rgba(160,0,0,0.35); }
    32% { box-shadow: 0 0 15px rgba(80,0,0,0.5), 0 0 30px rgba(60,0,0,0.25), inset 0 0 8px rgba(100,0,0,0.2); }
    34% { box-shadow: 0 0 30px rgba(180,0,0,0.8), 0 0 60px rgba(120,0,0,0.5), inset 0 0 20px rgba(160,0,0,0.35); }
}

/* Upside vines pseudo-elements — vines climbing from bottom to top */
.profile-avatar-frame-overlay.upside_vines::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M15,200 C12,175 25,155 18,130 S28,100 20,75 S15,50 25,25 T22,5' stroke='%232d4a2d' stroke-width='5' fill='none' opacity='0.85'/%3E%3Cpath d='M18,130 Q32,120 42,128' stroke='%23335533' stroke-width='2.5' fill='none' opacity='0.7'/%3E%3Cpath d='M20,75 Q36,65 45,72' stroke='%23335533' stroke-width='2' fill='none' opacity='0.6'/%3E%3Cpath d='M25,25 Q38,18 44,25' stroke='%23264026' stroke-width='2' fill='none' opacity='0.5'/%3E%3Cpath d='M185,200 C188,175 175,155 182,130 S172,100 180,75 S185,50 175,25 T178,5' stroke='%232d4a2d' stroke-width='5' fill='none' opacity='0.85'/%3E%3Cpath d='M182,130 Q168,120 158,128' stroke='%23335533' stroke-width='2.5' fill='none' opacity='0.7'/%3E%3Cpath d='M180,75 Q164,65 155,72' stroke='%23335533' stroke-width='2' fill='none' opacity='0.6'/%3E%3Cpath d='M175,25 Q162,18 156,25' stroke='%23264026' stroke-width='2' fill='none' opacity='0.5'/%3E%3Cellipse cx='42' cy='128' rx='5' ry='3' fill='%23446644' opacity='0.7' transform='rotate(-20 42 128)'/%3E%3Cellipse cx='45' cy='72' rx='4' ry='3' fill='%23335533' opacity='0.6' transform='rotate(15 45 72)'/%3E%3Cellipse cx='158' cy='128' rx='5' ry='3' fill='%23446644' opacity='0.7' transform='rotate(20 158 128)'/%3E%3Cellipse cx='155' cy='72' rx='4' ry='3' fill='%23335533' opacity='0.6' transform='rotate(-15 155 72)'/%3E%3C/svg%3E") center/cover no-repeat;
    animation: vine-pulse-p 6s ease-in-out infinite;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(40, 80, 40, 0.6));
}
.profile-avatar-frame-overlay.upside_vines::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 23px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M28,200 Q32,170 24,135 T34,90 T22,50 T32,15' stroke='%23264026' stroke-width='3' fill='none' opacity='0.6'/%3E%3Cpath d='M24,135 Q38,125 46,132' stroke='%23335533' stroke-width='1.5' fill='none' opacity='0.5'/%3E%3Cpath d='M172,200 Q168,170 176,135 T166,90 T178,50 T168,15' stroke='%23264026' stroke-width='3' fill='none' opacity='0.6'/%3E%3Cpath d='M176,135 Q162,125 154,132' stroke='%23335533' stroke-width='1.5' fill='none' opacity='0.5'/%3E%3Ccircle cx='46' cy='132' r='3' fill='%23335533' opacity='0.5'/%3E%3Ccircle cx='154' cy='132' r='3' fill='%23335533' opacity='0.5'/%3E%3C/svg%3E") center/cover no-repeat;
    animation: vine-pulse-p 6s ease-in-out infinite 3s;
    animation-direction: reverse;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(40, 80, 40, 0.5));
}
@keyframes vine-pulse-p {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.85; filter: drop-shadow(0 0 3px rgba(40, 80, 40, 0.5)); }
    25% { transform: rotate(2deg) scale(1.02); opacity: 0.95; }
    50% { transform: rotate(-1deg) scale(1.04); opacity: 1; filter: drop-shadow(0 0 6px rgba(50, 100, 50, 0.6)); }
    75% { transform: rotate(1deg) scale(1.02); opacity: 0.9; }
}

/* avatar image sizing is now handled by .profile-avatar-wrap */
.profile-status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    background: #bbb;
    box-shadow: 0 0 8px #0005;
}
.profile-status-indicator.online { background: #4caf50; }
.profile-status-indicator.offline { background: #888; }
.profile-header-info {
    flex: 1 1 300px;
    min-width: 0;
}
.profile-username {
    color: #fff;
    font-size: 2.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    text-shadow: 0 2px 8px #0008;
    letter-spacing: 0.5px;
}
.profile-real-name {
    color: #b0e0ff;
    font-size: 1.1rem;
    margin: 0 0 0.2rem 0;
    font-weight: 400;
}
.steam-status {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: inline-block;
}
.steam-status.online { color: #4caf50; }
.steam-status.offline { color: #bbb; }
.profile-badges {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.badge {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    color: #fff;
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 1px 4px #fc9d0b33;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.profile-controls {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-end;
    margin-left: auto;
    flex: 0 0 auto;
}
@media (max-width: 700px) {
  .profile-controls {
    width: 100%;
    align-items: flex-start;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

.steam-btn {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(252, 157, 11, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


/* Dedicated action bar above the profile content (prevents overlap with username) */
.profile-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0.6rem 1rem;
  background: transparent;
  border-bottom: 1px solid rgba(252, 157, 11, 0.15);
  position: sticky;
  top: 0;
  z-index: 5;
}
.profile-actions-bar .close-popup { margin-left: auto; }
.steam-profile-popup .profile-actions-bar .steam-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 6px;
}
/* Hide text labels on very small screens to keep bar compact */
@media (max-width: 520px) {
  .steam-profile-popup .profile-actions-bar .label { display: none; }
}
@media (max-width: 700px) {
  .profile-actions-bar { flex-wrap: wrap; }
}

/* In the popup, place controls on a second row so they never overlap the username */
.steam-profile-popup .profile-controls {
  order: 3;
  width: 100%;
  margin-left: 0;
  align-items: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Allow long usernames to wrap instead of being cut off */
.steam-profile-popup .profile-username {
  font-size: 1.8rem;
  line-height: 1.2;
  word-break: break-word;
}

/* Make header action buttons in profile popup more compact */
.steam-profile-popup .profile-controls .steam-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 6px;
  line-height: 1.1;
}

/* On very small screens, allow buttons to wrap nicely */
@media (max-width: 480px) {
  .steam-profile-popup .profile-controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

.steam-btn:hover {
    background: linear-gradient(135deg, #e68a00 0%, #fc9d0b 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(252, 157, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.steam-btn:active {
    transform: translateY(-1px);
}
.close-popup {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    margin-right: 0.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.close-popup:hover {
    background: rgba(252, 157, 11, 0.8);
    border-color: rgba(252, 157, 11, 0.6);
    color: #fff;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 4px 12px rgba(252, 157, 11, 0.4);
}
.steam-profile-body {
    padding: 2rem 2.2rem 1.5rem 2.2rem;
    background: linear-gradient(180deg, rgba(34, 40, 49, 0.98) 0%, rgba(24, 30, 40, 0.95) 100%);
    border-radius: 0 0 24px 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.profile-main-content {
    width: 100%;
}
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-box {
    background: linear-gradient(135deg, rgba(35, 42, 52, 0.8) 0%, rgba(252, 157, 11, 0.15) 100%);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(252, 157, 11, 0.15), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(252, 157, 11, 0.2);
    transition: all 0.3s ease;
    animation: statBoxSlideIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.stat-box:nth-child(1) { animation-delay: 0.1s; }
.stat-box:nth-child(2) { animation-delay: 0.2s; }
.stat-box:nth-child(3) { animation-delay: 0.3s; }
.stat-box:nth-child(4) { animation-delay: 0.4s; }
.stat-box:nth-child(5) { animation-delay: 0.5s; }
.stat-box:nth-child(6) { animation-delay: 0.6s; }
.stat-box:nth-child(7) { animation-delay: 0.7s; }
.stat-box:nth-child(8) { animation-delay: 0.8s; }

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(252, 157, 11, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: rgba(252, 157, 11, 0.5);
}
.stat-number {
    color: #fc9d0b;
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 8px #0008;
}
.stat-label {
    color: #b0e0ff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}
.profile-bio-section {
    margin-bottom: 1.5rem;
}
.profile-bio {
    background: linear-gradient(135deg, rgba(252, 157, 11, 0.12) 0%, rgba(252, 157, 11, 0.05) 100%);
    border-left: 4px solid #fc9d0b;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 400;
    box-shadow: 0 2px 8px rgba(252, 157, 11, 0.1), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid rgba(252, 157, 11, 0.15);
    border-left: 4px solid #fc9d0b;
}
.profile-showcase-section {
    margin-bottom: 1.5rem;
}
.showcase-header h3 {
    color: #fc9d0b;
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
}
.showcase-content {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.badge-showcase, .trade-items-showcase {
    flex: 1 1 180px;
    min-width: 160px;
}
.badges-grid, .items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.5rem;
}
.badge-item, .item-showcase {
    background: linear-gradient(135deg, #fc9d0b22 0%, #232a34 100%);
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 4px #fc9d0b11;
}
.badge-icon, .item-icon {
    font-size: 1.2rem;
    margin-right: 0.3rem;
}
.no-items {
    color: #bbb;
    font-size: 0.98rem;
    margin-top: 0.5rem;
}
.profile-popup.animated {
    animation: popupBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    border-radius: 18px 18px 0 0;
    position: relative;
}

.user-basic-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.popup-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    animation: avatarPulse 2s infinite;
}

.user-title h2 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.online-indicator.online {
    color: #48bb78;
}

.online-indicator.offline {
    color: #a0aec0;
}

.online-indicator i {
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

.close-popup {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-content {
    padding: 1.5rem;
}

.user-bio {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(252, 157, 11, 0.1);
    border-radius: 12px;
    border-left: 4px solid #fc9d0b;
}

.user-bio p {
    margin: 0;
    color: #c8d1e0;
    font-style: italic;
    line-height: 1.4;
}

.user-bio i {
    color: #fc9d0b;
    font-size: 0.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #333;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 157, 11, 0.2);
    border-color: #fc9d0b;
}

.animated-stat {
    animation: statSlideIn 0.6s ease-out forwards;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fc9d0b;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.25rem;
}

.popup-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.popup-button {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.popup-button.primary {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    color: white;
}

.popup-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(252, 157, 11, 0.4);
}

.popup-button.secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.popup-button.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(72, 187, 120, 0.4);
}

.popup-button.accent {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.popup-button.accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

.popup-button.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

/* Loading Popup */
.loading-popup {
    text-align: center;
    padding: 2rem;
    background: #1a1a1a;
    border-radius: 15px;
    border: 2px solid #fc9d0b;
}

.loading-spinner {
    font-size: 2rem;
    color: #fc9d0b;
    margin-bottom: 1rem;
}

.loading-popup p {
    color: #c8d1e0;
    margin: 0;
}

/* Error Popup */
.error-popup {
    text-align: center;
    padding: 2rem;
    background: #1a1a1a;
    border-radius: 15px;
    border: 2px solid #e74c3c;
}

.error-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-popup h3 {
    color: #e74c3c;
    margin: 0 0 1rem 0;
}

.error-popup p {
    color: #c8d1e0;
    margin: 0 0 1.5rem 0;
}

/* Stats Customization Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-header {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.popup-body {
    padding: 2rem;
    color: white;
}

.popup-body p {
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.stats-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(252, 157, 11, 0.5);
}

.stat-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.stat-option input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    border-color: #fc9d0b;
}

.stat-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.stat-name {
    font-weight: 500;
    color: white;
    font-size: 1rem;
}

.popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(252, 157, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 157, 11, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 600px) {
    .popup-content {
        width: 95%;
        margin: 1rem;
    }

    .popup-header {
        padding: 1rem 1.5rem;
    }

    .popup-body {
        padding: 1.5rem;
    }

    .stats-options {
        grid-template-columns: 1fr;
    }

    .popup-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }
}
.stats-customizer {
    max-width: 600px;
}

.stats-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-option {
    display: block;
    background: #2d2d2d;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.stat-option:hover {
    border-color: #fc9d0b;
    transform: translateY(-2px);
}

.stat-option.selected {
    border-color: #fc9d0b;
    background: rgba(252, 157, 11, 0.1);
}

.stat-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stat-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-preview i {
    width: 30px;
    height: 30px;
    background: #fc9d0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.stat-preview span {
    flex: 1;
    color: #c8d1e0;
    font-weight: 600;
}

.stat-value-preview {
    color: #fc9d0b;
    font-weight: bold;
    font-size: 1.1rem;
}

.selected-count {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(252, 157, 11, 0.1);
    border-radius: 8px;
    color: #fc9d0b;
    font-weight: bold;
}

/* Toast Messages */
.popup-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    opacity: 1;
    transition: opacity 0.3s ease;
    animation: toastSlideIn 0.4s ease-out;
}

.popup-toast.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.popup-toast.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Animations */
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popupBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes statSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-popup {
        width: 95%;
        margin: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-button {
        min-width: auto;
    }

    .stats-selector {
        grid-template-columns: 1fr;
    }
}

/* Cosmetics Customization Styles */
.cosmetic-btn {
    padding: 0.75rem;
    border: 2px solid #666;
    background: rgba(100, 100, 100, 0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cosmetic-btn:hover:not(.locked) {
    border-color: #fc9d0b;
    background: rgba(252, 157, 11, 0.15);
    transform: translateX(4px);
}

.cosmetic-btn.equipped {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.cosmetic-btn.equipped:hover {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
}

.cosmetic-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.cosmetic-btn.locked:hover {
    border-color: #666;
    background: rgba(100, 100, 100, 0.1);
    transform: none;
}

#cosmetics-container {
    gap: 1.5rem;
}

#cosmetics-container > div {
    background: rgba(50, 50, 50, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(252, 157, 11, 0.2);
}

#cosmetics-container h4 {
    margin: 0 0 0.75rem 0;
    color: #fc9d0b;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Activity Section */
.profile-activity-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(252, 157, 11, 0.2);
}

.profile-activity-section h3 {
    color: #fc9d0b;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, rgba(252, 157, 11, 0.08) 0%, rgba(252, 157, 11, 0.03) 100%);
    border-radius: 10px;
    border-left: 3px solid #fc9d0b;
    transition: all 0.3s ease;
    animation: activitySlideIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.activity-item:nth-child(1) { animation-delay: 0.1s; }
.activity-item:nth-child(2) { animation-delay: 0.2s; }
.activity-item:nth-child(3) { animation-delay: 0.3s; }
.activity-item:nth-child(4) { animation-delay: 0.4s; }
.activity-item:nth-child(5) { animation-delay: 0.5s; }
.activity-item:nth-child(6) { animation-delay: 0.6s; }

.activity-item:hover {
    background: linear-gradient(135deg, rgba(252, 157, 11, 0.15) 0%, rgba(252, 157, 11, 0.08) 100%);
    border-left-color: #e68a00;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(252, 157, 11, 0.15);
}

.activity-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;
}

.activity-time {
    color: #b0e0ff;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.no-activity {
    color: #888;
    font-size: 0.95rem;
    text-align: center;
    padding: 1.5rem;
    font-style: italic;
}

/* Animation for stat boxes */
@keyframes statBoxSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation for activity items */
@keyframes activitySlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Cosmetics Section Styles */
.profile-cosmetics-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(252, 157, 11, 0.05);
    border-left: 3px solid #fc9d0b;
    border-radius: 8px;
}

.cosmetics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-cosmetics-section h3 {
    color: #fc9d0b;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cosmetics-settings-btn {
    background: rgba(252, 157, 11, 0.15);
    border: 1.5px solid rgba(252, 157, 11, 0.5);
    color: #fff3dc;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cosmetics-settings-btn:hover {
    background: rgba(252, 157, 11, 0.25);
    border-color: #fc9d0b;
    color: #fff;
    transform: translateY(-1px);
}

.cosmetics-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.cosmetic-display-item {
    background: rgba(252, 157, 11, 0.1);
    border: 2px solid rgba(252, 157, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.cosmetic-display-item:hover {
    background: rgba(252, 157, 11, 0.15);
    border-color: rgba(252, 157, 11, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 157, 11, 0.2);
}

.cosmetic-display-item > div:first-child {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2.5rem;
}

.cosmetic-display-item > div:nth-child(2) {
    font-weight: bold;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.cosmetic-display-item > div:nth-child(3) {
    font-size: 0.75rem;
    color: #aaa;
}


/* Compact icon-only controls for small screens or popup-specific class */
.steam-profile-popup .steam-btn .icon { display: inline-block; margin-right: 0.4rem; }
.steam-profile-popup .steam-btn .label { display: inline-block; }

.steam-profile-popup.icons-only .steam-btn .label { display: none; }
.steam-profile-popup.icons-only .steam-btn .icon { margin-right: 0; }
.steam-profile-popup.icons-only .steam-btn { min-width: 38px; justify-content: center; }

@media (max-width: 520px) {
  .steam-profile-popup .steam-btn .label { display: none; }
  .steam-profile-popup .steam-btn .icon { margin-right: 0; }
}

/* ========== MOBILE PROFILE POPUP IMPROVEMENTS ========== */

@media (max-width: 768px) {
  .steam-profile-popup {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    border-radius: 12px;
  }

  .profile-header {
    padding: 1rem;
  }

  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .profile-info h2 {
    font-size: 1.1rem;
  }

  .profile-info p {
    font-size: 0.9rem;
  }

  .profile-actions-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .steam-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    flex: 1 1 auto;
    min-width: 80px;
  }

  .profile-controls {
    position: static;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem;
  }

  .stat-item h4 {
    font-size: 0.85rem;
  }

  .stat-item p {
    font-size: 1rem;
  }

  .achievements-selector,
  .items-selector {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .achievement-item,
  .item-card {
    padding: 0.75rem;
  }

  .settings-actions,
  .showcase-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .settings-actions button,
  .showcase-actions button {
    width: 100%;
    padding: 0.75rem;
  }

  .profile-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .profile-tab {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .steam-profile-popup {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 95vh !important;
    border-radius: 8px;
    margin: 0;
  }

  .profile-header {
    padding: 0.75rem;
  }

  .profile-avatar {
    width: 70px;
    height: 70px;
  }

  .profile-info h2 {
    font-size: 1rem;
  }

  .profile-info p {
    font-size: 0.8rem;
  }

  .profile-actions-bar {
    padding: 0.5rem;
    gap: 0.4rem;
  }

  .steam-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    min-width: 60px;
  }

  .steam-btn .label {
    display: none;
  }

  .steam-btn .icon {
    margin-right: 0;
  }

  .summary-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.5rem;
  }

  .stat-item h4 {
    font-size: 0.75rem;
  }

  .stat-item p {
    font-size: 0.9rem;
  }

  .achievements-selector,
  .items-selector {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .achievement-item,
  .item-card {
    padding: 0.5rem;
  }

  .profile-tabs {
    gap: 0.3rem;
  }

  .profile-tab {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* View Full Profile Button */
.view-full-profile-section {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(252, 157, 11, 0.15);
    margin-top: 0.5rem;
}

.view-full-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #fc9d0b 0%, #e68a00 100%);
    border: none;
    border-radius: 12px;
    color: #1a2332;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(252, 157, 11, 0.35);
    position: relative;
    overflow: hidden;
}

.view-full-profile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.view-full-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 157, 11, 0.5);
}

.view-full-profile-btn:hover::before {
    left: 100%;
}

.view-full-profile-btn i:first-child {
    font-size: 1.1rem;
}

.view-full-profile-btn i:last-child {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.view-full-profile-btn:hover i:last-child {
    transform: translateX(4px);
}
