/* Fonts are loaded via <link> in each page's <head> (faster than @import). */

* {
    font-family: "Exo 2", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    background: #151617;
    color: #fff;
}

body {
    padding: 0;
    margin: 0;
}

::selection {
    background: #a88a45;
    color: #000;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #151617; }
::-webkit-scrollbar-thumb { background: #2e2e2e; }
::-webkit-scrollbar-thumb:hover { background: #343434; }

.loading-screen {
    position: fixed;
    inset: 0;
    background: #0e0f11;
    display: grid;
    place-items: center;
    z-index: 9999;
}

.spinner {
    animation: spinner-rotate 1s linear infinite;
    width: 50px;
    height: 50px;
    border: 4px solid #2e2e2e;
    border-top-color: #a88a45;
    border-radius: 50%;
}

@keyframes spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#skins-page {
    min-height: 100vh;
    padding-bottom: 2rem;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    margin: 1rem;
}

.profile-header-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #212121;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 0;
    width: 100%;
    max-width: 780px;
    margin-left: auto;
    margin-right: calc(260px + 2rem);
    overflow: hidden;
}

.profile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.75rem 2rem;
}

.profile-header-bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 2rem;
    border-top: 1px solid #2a2a2a;
    background: #212121;
    gap: 1rem;
}

.profile-header-bottom .profile-owner-badge {
    order: 1;
    margin: 0;
}

.profile-header-bottom .profile-meta-center {
    order: 2;
    position: static;
    transform: none;
}

.profile-header-bottom .profile-meta-left {
    order: 3;
}

.profile-header-bottom:not(:has(.profile-owner-badge)) .profile-meta-left {
    order: 1;
}

.profile-header-bottom:not(:has(.profile-owner-badge)) .profile-meta-center {
    order: 2;
}

.added-by-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #ccc;
}

.added-by-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    display: block;
    background: #2a2a2a;
}

.added-by-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.profile-owner-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: #ccc;
}

.owner-avatar {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    display: block !important;
    background: #2a2a2a;
    object-fit: cover !important;
}

.owner-label {
    color: #ddd;
    font-size: 0.82rem;
}

.owner-label strong {
    color: #fff;
    font-weight: 600;
}

.added-by-text {
    white-space: nowrap;
}

.added-by-username {
    color: #fff;
    font-weight: 600;
}

.profile-meta-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-meta-center {
    flex-shrink: 0;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.profile-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.profile-meta-item .meta-label {
    color: #bbb;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.profile-meta-item .meta-value {
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
}

#skins-page #player-info #personal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

#skins-page #player-info #personal #avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#skins-page #player-info #personal #about {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

#skins-page #player-info #personal #about .profile-owner-badge {
    display: none !important;
}

#skins-page #player-info #personal #about #username {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* em-based so the badge scales with the username font-size (which shrinks on
   smaller screens) and stays vertically centered with it instead of towering
   over it. The BANNED badge in profile.js uses these same proportions in red. */
.masked-badge {
    font-size: 0.46em;
    font-weight: 600;
    color: #c9a84c;
    background: rgba(168, 138, 69, 0.12);
    border: 1px solid rgba(168, 138, 69, 0.3);
    border-radius: 0.4em;
    padding: 0.4em 0.85em;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.account-type-badge {
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
}

#platformIcons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

#platformIcons .platform-badge {
    width: 28px !important;
    height: 28px !important;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

#platformIcons .platform-badge:hover {
    opacity: 0.7;
}

#platformIcons .platform-badge img {
    width: 18px !important;
    height: 18px !important;
}

.profile-stats-right { display: none; }
.profile-header-stats { display: none; }

#skins-page #player-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
    width: 100%;
}

.profile-currency-panel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
    flex-shrink: 0;
    align-self: flex-start;
}

.phs-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.phs-currency-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    mix-blend-mode: screen;
}

.phs-currency-icon[alt="Credits"] {
    mix-blend-mode: normal;
    filter: brightness(1.5) contrast(1.1);
}

.phs-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

#skins-page #player-info #personal #avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 2px solid #3a3a3a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: #b89968;
    color: #000;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.logout-btn:hover {
    background: #a88a5d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logout-btn:active {
    background: #987a52;
    transform: translateY(0);
}

#skins-page #quantz {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 70vw;
    margin-left: auto;
    margin-right: auto;
}

#skins-page #quantz > .quant_group {
    display: flex;
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

#skins-page #quantz > .quant_group .quant {
    display: flex;
    gap: 0.25rem;
    font-size: 0.8rem;
    background: #1e1e1e;
    border-radius: 5px;
    cursor: default;
}

#skins-page #quantz > .quant_group .quant .value {
    padding: 0.25rem 0.5rem;
    background: #2e2e2e;
    border-radius: 5px;
}

#skins-page #quantz > .quant_group .quant .title {
    padding: 0.25rem 0.5rem 0.25rem 0.1rem;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.inventory-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2rem;
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding: 0 2rem 0 2rem;
}

.ranked-charms-sidebar {
    position: static;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: calc(100% + 2rem);
    margin-right: -2rem;
    margin-top: -1rem;
}

.ranked-charms-sidebar::-webkit-scrollbar { width: 6px; }
.ranked-charms-sidebar::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

.current-season-card {
    background: #212121;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0;
}

.cs-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
}

.cs-rank-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-rank-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.cs-rank-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cs-rank-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.cs-rp {
    font-size: 0.75rem;
    color: #a88a45;
    font-weight: 600;
}

.cs-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cs-matches-ring {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #2a2a2a;
    border-top-color: #e05252;
    border-right-color: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-matches-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}

.cs-stats {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.cs-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cs-stat-label {
    font-size: 0.62rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: 18px;
}

.cs-stat-val {
    font-size: 0.72rem;
    font-weight: 600;
    color: #ccc;
    text-align: right;
    min-width: 2.5rem;
}

.cs-modes {
    border-top: 1px solid #2a2a2a;
    padding: 0.5rem 0.85rem 0.65rem;
}

.cs-modes-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    font-size: 0.6rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.3rem;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid #252525;
}

.cs-mode-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.2rem 0;
    color: #ccc;
}

.cs-mode-row .mode-name {
    color: #fff;
    font-weight: 500;
}

.cs-mode-row .mode-val {
    text-align: right;
    min-width: 2.5rem;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    padding: 0.4rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #2a2a2a;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.last-played-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 0.75rem 1rem;
    background: #212121;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    margin-bottom: 0.7rem;
    font-size: 0.82rem;
    width: 100%;
    box-sizing: border-box;
    gap: 0.5rem 0.5rem;
}

.last-played-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1;
    grid-column: 1;
    grid-row: 1;
}

.last-played-left svg {
    color: #f5c84a;
    fill: #f5c84a;
    stroke: none;
    flex-shrink: 0;
    display: block;
}

.last-played-time {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.last-played-more {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
    color: #c9a84c;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.last-played-more:hover {
    color: #e0bb5c;
}

.last-played-more .lpm-arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}

.last-played-more:hover .lpm-arrow {
    transform: translateX(3px);
}

.last-played-info {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 1.65rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: -0.15rem;
}

.last-played-info .lp-plat {
    font-size: 0.72rem;
    color: #8c8c8c;
    line-height: 1.2;
    white-space: nowrap;
}

.last-played-info .lp-game {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e8e8e8;
    line-height: 1.2;
    text-align: right;
}

.sidebar-header-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    border-bottom: 1px solid #2a2a2a;
    width: 100%;
    box-sizing: border-box;
}

#rankedCharmsSidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow: hidden;
}

.charm-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: #212121;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    transition: background 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.charm-card:hover { background: #272727; }

.charm-stats-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.05rem;
    white-space: nowrap;
}

.charm-stat-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.charm-stat-label {
    font-size: 0.6rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: 14px;
    text-align: right;
}

.charm-stat-value {
    font-size: 0.72rem;
    font-weight: 600;
    color: #ccc;
    min-width: 2.2rem;
    text-align: right;
}

.charm-card.copper   { border-left: 2px solid #CD7F32; }
.charm-card.bronze   { border-left: 2px solid #CD7F32; }
.charm-card.silver   { border-left: 2px solid #C0C0C0; }
.charm-card.gold     { border-left: 2px solid #FFD700; }
.charm-card.platinum { border-left: 2px solid #55DED3; }
.charm-card.emerald  { border-left: 2px solid #16E38C; }
.charm-card.diamond  { border-left: 2px solid #C1A4FF; }
.charm-card.champion { border-left: 2px solid #FA1B59; }
.charm-card.no-rank  { border-left: 2px solid #333; }

.charm-icon-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.charm-icon-wrapper img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.charm-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.charm-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.charm-name.copper   { color: #CD7F32; }
.charm-name.bronze   { color: #CD7F32; }
.charm-name.silver   { color: #C0C0C0; }
.charm-name.gold     { color: #FFD700; }
.charm-name.platinum { color: #55DED3; }
.charm-name.emerald  { color: #16E38C; }
.charm-name.diamond  { color: #C1A4FF; }
.charm-name.champion { color: #FA1B59; }
.charm-name.no-rank  { color: #777; }

.charm-rank {
    color: #555;
    font-weight: 400;
    font-size: 0.7rem;
}

#skins-page #all-skins {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    max-width: 780px;
    margin-left: auto;
    margin-right: 0;
}

.inv-category {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.inv-category:last-child { margin-bottom: 0; }

.inv-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(255, 217, 0, 0.15);
    border-left: 3px solid #FFD900;
    border-radius: 0 6px 6px 0;
}

.inv-category-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: #FFD900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-shadow: 0 0 8px rgba(255, 217, 0, 0.4);
}

.inv-category-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #FFD900;
    background: rgba(255, 217, 0, 0.18);
    border: 1px solid rgba(255, 217, 0, 0.4);
    border-radius: 10px;
    padding: 0.1rem 0.6rem;
    min-width: 24px;
    text-align: center;
}

.inv-category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.inv-item {
    position: relative;
    background: #232323;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    transition: all 0.15s ease;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

.inv-item::before { display: none; }

.inv-item:hover {
    background: #2a2a2a;
    border-color: rgba(255, 217, 0, 0.6);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.skin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 300000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.skin-modal-overlay.open { opacity: 1; pointer-events: auto; }

.skin-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.skin-modal-overlay.open .skin-modal { transform: scale(1); }

.skin-modal-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    background: rgba(10,10,10,0.6);
}

.skin-modal-img-wrap img {
    max-width: 520px;
    max-height: 300px;
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}

.skin-modal-img-wrap .skin-no-img { color: #555; font-size: 0.9rem; }

.skin-modal-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    background: rgba(20,20,20,0.8);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
}

.skin-modal-cat { display: none; }

.platform-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.platform-modal.show {
    display: flex;
}

.platform-modal-content {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.platform-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.platform-modal-icon {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-modal-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.platform-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.platform-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #9a9ba0;
    font-size: 1.4rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
}

.platform-modal-close:hover {
    color: #fff;
}

.platform-modal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.platform-modal-link {
    padding: 0.5rem 1rem;
    background: hsl(37, 52%, 65%);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    color: #fff !important;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    font-family: "Exo 2", sans-serif;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
    letter-spacing: 0;
    width: 100%;
    max-width: 100%;
}

.platform-modal-link:hover {
    background: hsl(37, 52%, 61%);
}

.platform-modal-link:active {
    background: hsl(37, 52%, 57%);
    transform: scale(0.99);
}

.platform-modal-link-info {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.platform-modal-link-title {
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    font-family: "Exo 2", sans-serif !important;
    line-height: 1.4;
}

.platform-modal-link-url {
    display: none;
}

.platform-modal-link-arrow {
    display: none;
}

.platform-badge.amazon img,
.platform-badge.luna img { filter: none !important; }

/* Play History modal (opened from "View more details") */
.games-modal-content {
    max-width: 480px;
    padding: 1.75rem;
}

.games-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.games-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 65vh;
    overflow-y: auto;
}

.games-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: #1f1f1f;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

/* Self-hosted flag font. Windows ships no glyphs for regional-indicator flag
   emoji (it renders the two letters, e.g. "US", instead), so we supply a font
   that contains only the flag glyphs. Listed first on .games-flag so the flag
   renders consistently on every platform; non-flag text falls through to the
   system fonts since this font has nothing else. */
@font-face {
    font-family: 'Twemoji Country Flags';
    src: url('/fonts/TwemojiCountryFlags.woff2') format('woff2');
    font-display: swap;
    unicode-range: U+1F1E6-1F1FF;
}

.games-flag {
    font-family: 'Twemoji Country Flags', system-ui, sans-serif;
    font-size: 1.3rem;
    line-height: 1;
}

.games-country-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ddd;
}

.games-modal-body::-webkit-scrollbar { width: 6px; }
.games-modal-body::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

.games-platform {
    background: #212121;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 0.9rem 1rem;
}

.games-platform-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.games-platform-head img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.games-platform-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.games-platform-game {
    margin-left: auto;
    color: #c9a84c;
    font-size: 0.76rem;
    font-weight: 600;
    text-align: right;
}

.games-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.gstat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gstat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.gstat-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e8e8e8;
}

.games-tracker-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.8rem;
    color: #c9a84c;
    font-size: 0.73rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.games-tracker-link:hover { color: #e0bb5c; }
.games-tracker-link .lpm-arrow { display: inline-block; transition: transform 0.15s ease; }
.games-tracker-link:hover .lpm-arrow { transform: translateX(3px); }

.games-empty {
    text-align: center;
    padding: 1.75rem 0.5rem;
}

.games-empty-title {
    color: #ddd;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
}

.games-empty-text {
    color: #888;
    font-size: 0.8rem;
    line-height: 1.55;
    max-width: 330px;
    margin: 0 auto;
}

/* Banned Account Warning */
/* The BANNED badge beside the username is styled inline in profile.js so it
   renders even if a stale profile.css is cached. (Mirrors .masked-badge, red.) */

@media (max-width: 1200px) {
    .inventory-layout { grid-template-columns: 1fr; }
}

@media screen and (max-width: 1000px) {
    #skins-page #quantz { max-width: unset; margin: 0; }
}

@media (max-width: 768px) {
    #skins-page {
        margin: 0.5rem;
        gap: 0.75rem;
    }
    
    #skins-page #player-info {
        margin: 0.75rem auto 0;
        padding: 0 0.5rem;
    }
    
    .profile-header-card {
        margin-right: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .profile-header-top {
        flex-direction: row;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    #skins-page #player-info #personal {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
    }
    
    #skins-page #player-info #personal #avatar {
        width: 76px;
        height: 76px;
        flex-shrink: 0;
    }
    
    #skins-page #player-info #personal #about #username { font-size: 1.1rem; }
    .account-type-badge { font-size: 0.75rem; }
    .profile-currency-panel { gap: 0.2rem; align-self: flex-start; }
    .phs-value { font-size: 0.78rem; }
    .phs-currency-icon { width: 16px; height: 16px; }
    
    .profile-header-bottom {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.5rem 1rem;
    }
    
    .profile-header-bottom .profile-owner-badge {
        order: 1;
    }
    
    .profile-meta-center { 
        order: 2;
    }
    
    .added-by-section {
        font-size: 0.75rem;
        gap: 0.4rem;
    }
    
    .added-by-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px;
        min-height: 26px;
        max-width: 26px;
        max-height: 26px;
    }
    
    .added-by-avatar img {
        max-width: 26px !important;
        max-height: 26px !important;
    }
    
    .profile-owner-badge {
        font-size: 0.72rem;
        gap: 0.4rem;
    }
    
    .owner-avatar {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }
    
    .owner-label {
        font-size: 0.72rem;
    }
    
    .profile-meta-left { flex-wrap: wrap; gap: 0.6rem; }
    .profile-meta-center { position: static; transform: none; }
    .profile-meta-item { font-size: 0.68rem; }
    .profile-meta-item .meta-label { font-size: 0.58rem; }
    .profile-meta-item .meta-value { font-size: 0.68rem; }

    .inventory-layout {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        margin: 0.75rem 0 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    #skins-page #all-skins {
        max-width: 100%;
        width: 100%;
        margin: 0;
        gap: 1.25rem;
    }
    
    .ranked-charms-sidebar {
        width: 100%;
        margin-right: 0;
        max-width: 100%;
        margin-top: 0;
    }
    
    .inv-category {
        margin-bottom: 1rem;
        gap: 0.5rem;
        width: 100%;
    }
    
    .inv-category-header { padding: 0.45rem 0.75rem; }
    .inv-category-name { font-size: 0.62rem; letter-spacing: 0.08em; }
    .inv-category-count { font-size: 0.62rem; padding: 0.08rem 0.45rem; }
    .inv-category-grid { gap: 0.25rem; }
    
    .inv-item {
        padding: 0.28rem 0.45rem;
        font-size: 0.6rem;
        border-radius: 5px;
    }
    
    .current-season-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cs-top { padding: 0.65rem 0.75rem; }
    .cs-rank-img { width: 36px; height: 36px; }
    .cs-rank-name { font-size: 0.8rem; }
    .cs-rp { font-size: 0.68rem; }
    .cs-matches-ring { width: 38px; height: 38px; }
    .cs-matches-num { font-size: 0.65rem; }
    .cs-stat-label { font-size: 0.56rem; width: 14px; }
    .cs-stat-val { font-size: 0.65rem; min-width: 2rem; }
    .cs-modes { padding: 0.4rem 0.75rem 0.5rem; }
    .cs-modes-header { font-size: 0.55rem; }
    .cs-mode-row { font-size: 0.68rem; }
    
    #rankedCharmsSidebar { width: 100%; }
    
    .charm-card {
        width: 100%;
        box-sizing: border-box;
        padding: 0.45rem 0.6rem;
    }
    
    .charm-icon-wrapper { width: 28px; height: 28px; }
    .charm-icon-wrapper img { width: 26px; height: 26px; }
    .charm-name { font-size: 0.72rem; }
    .charm-rank { font-size: 0.62rem; }
    
    .last-played-card {
        width: 100%;
        box-sizing: border-box;
        padding: 0.6rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .last-played-left { font-size: 0.75rem; }
    .last-played-time { font-size: 0.75rem; }
    .last-played-info .lp-game { font-size: 0.72rem; }
    .last-played-info .lp-plat { font-size: 0.66rem; }
    .sidebar-section-label { font-size: 0.62rem; }
    
    .skin-modal-img-wrap { padding: 1rem; }
    .skin-modal-img-wrap img { max-width: 90vw; max-height: 200px; }
    .skin-modal-name { font-size: 0.85rem; padding: 0.4rem 1rem; }
    
}

