/* ==========================================================================
   leaderboards.css — STRUCTURE + NEUTRAL DEFAULTS
   Load order: always first. Overlays (default.css / overlay1.css / overlay2.css)
   load on top via style-switcher.js and override the vars and visual rules here.
   ========================================================================== */

:root {
    /* Fonts — neutral defaults; overlays import and set theme-specific families */
    --font-primary:   sans-serif;
    --font-secondary: sans-serif;
    --font-tertiary:  sans-serif;
    --font-body:      sans-serif;

    /* Brand tokens */
    --color-brand-primary: #D22630;
    --color-brand-red:     #D22630;
    --color-brand-gray:    #C8C9C7;

    /* UI palette */
    --color-ui-primary:       #006580;
    --color-ui-primary-dk:    #003B53;
    --color-ui-primary-lt:    #99C1CC;
    --color-ui-primary-ltr:   #EEF3F4;
    --color-ui-secondary:     #4A4F54;
    --color-ui-secondary-dk:  #22272B;
    --color-ui-secondary-lt:  #707070;
    --color-ui-secondary-ltr: #F8F8F8;
    --color-ui-tertiary:      #9D4B70;
    --color-ui-tertiary-dk:   #6C1D45;
    --color-ui-tertiary-lt:   #C3A4B4;
    --color-ui-tertiary-ltr:  #EFE7EB;
    --color-ui-success:       #228665;
    --color-ui-success-dk:    #006448;
    --color-ui-success-lt:    #7DE3B9;
    --color-ui-success-ltr:   #ECF7F3;
    --color-ui-danger:        #D22630;
    --color-ui-danger-dk:     #800008;
    --color-ui-danger-lt:     #FF605A;
    --color-ui-danger-ltr:    #FFEBEE;
    --color-ui-warning:       #FF9E18;
    --color-ui-warning-dk:    #B95E04;
    --color-ui-warning-lt:    #FFCF51;
    --color-ui-warning-ltr:   #FFF5E7;
    --color-ui-black:         #191a1f;
    --color-ui-black-dk:      #000000;
    --color-ui-black-lt:      #D0D0D0;
    --color-ui-black-ltr:     #EFEFEF;
    --color-ui-white:         #f8f8f8;
    --color-ui-white-trans:   rgb(255 255 255 / 10%);
    --color-ui-gray:          #C8C9C7;
    --color-ui-gray-dk:       #979896;
    --color-ui-gray-lt:       #F4F5F4;
    --color-ui-gray-ltr:      #FBFCFA;
    --color-ui-focus:         #378EF0;

    /* Semantic text tokens */
    --color-text-black:     #191a1f;
    --color-text-secondary: #22272B;
    --color-text-gray:      #C8C9C7;
    --color-text-white:     #f8f8f8;

    /* Semantic background tokens — neutral defaults */
    --color-bg-lt:   var(--color-ui-white-trans);
    --color-bg-body: #ffffff;
    --color-bg-dk:   #191a1f;
    --color-bg-card: var(--color-ui-white);

    /* Semantic link tokens */
    --color-text-link-primary:       var(--color-ui-primary);
    --color-text-link-primary-hover: var(--color-ui-primary-dk);
    --color-text-link-secondary:     var(--color-text-black);

    /* Semantic heading tokens */
    --color-text-heading-primary:   var(--color-text-black);
    --color-text-heading-secondary: var(--color-text-black);

    /* Border tokens */
    --color-border-default: var(--color-ui-black-dk);
    --color-border-light:   var(--color-ui-gray);
    --border-thinner:  1px;
    --border-thin:     2px;
    --border-thick:    4px;
    --border-standard: var(--border-thinner) solid var(--color-border-light);
    --border-strong:   var(--border-thinner) solid var(--color-border-default);

    /* Border radius */
    --border-radius-sm: 0.125rem;
    --border-radius-md: 0.1875rem;
    --border-radius-lg: 0.25rem;

    /* Gradient palette */
    --gradient-001: linear-gradient(180deg, #0df75f 5%, #e6ce0c 76%);
    --gradient-002: linear-gradient(180deg, #00a8f3 10%, #d0f4f8 89%);
    --gradient-003: linear-gradient(180deg, #d2a411 10%, #dae574 89%);
    --gradient-004: linear-gradient(180deg, #00fe37 10%, #fff3ac 110%);
    --gradient-005: linear-gradient(180deg, #e56b6b 4%, #ecabdf 90%);
    --gradient-006: linear-gradient(180deg, #ffeffa 4%, #ecabdf 90%);

    /* Spacing scale */
    --spacing-none: 0rem;
    --spacing-xs:   0.125rem;
    --spacing-xs2:  0.25rem;
    --spacing-sm:   0.5rem;
    --spacing-sm2:  0.75rem;
    --spacing-md:   1rem;
    --spacing-md2:  1.5rem;
    --spacing-lg:   2rem;
    --spacing-lg2:  2.5rem;
    --spacing-lg3:  3rem;

    /* Layout scale */
    --layout-xs:  0.125rem;
    --layout-xs2: 0.25rem;
    --layout-sm:  0.5rem;
    --layout-sm2: 0.75rem;
    --layout-md:  1rem;
    --layout-md2: 1.5rem;
    --layout-lg:  2rem;
    --layout-lg2: 2.5rem;
    --layout-lg3: 3rem;
    --layout-xl:  4rem;
    --layout-xl2: 6rem;
    --layout-xl3: 10rem;

    /* Typography scale */
    --text-caption:  0.75rem;
    --text-label:    0.875rem;
    --text-body:     1rem;
    --text-title:    1.25rem;
    --text-heading1: 1.5rem;
    --text-heading2: 2rem;
    --text-heading3: 2.75rem;

    /* Font weights */
    --tw-light:   300;
    --tw-regular: 400;
    --tw-medium:  500;
    --tw-bold:    700;

    /* Line heights */
    --lh-sm: 1;
    --lh-md: 1.16;
    --lh-lg: 1.25;

    /* Bootstrap overrides */
    --bs-modal-zindex:  1055;
    --bs-modal-width:   500px;
    --bs-modal-padding: 1rem;
    --bs-modal-margin:  0.5rem;
    --bs-dark-rgb:                          rgb(5 5 5 / 50%);
    --bs-nav-tabs-link-active-bg:           var(--color-ui-white);
    --bs-nav-tabs-link-active-border-color: var(--color-ui-white);
    --bs-table-bg:                          transparent;

    /* ── Component-level theme hooks (overlays override these) ── */
    --tabs-bg-gradient:         none;
    --tab-link-active-bg:       var(--color-ui-primary);
    --score-digit-color:        inherit;
    --score-btn-color:          inherit;
    --score-btn-hover-color:    var(--color-ui-warning);
    --upload-btn-color:         var(--color-ui-primary);
    --score-form-border-color:  var(--color-border-default);
    --player-name-stroke-color: transparent;
    --player-name-stroke-width: 0px;
    --leaderboard-hover-shadow: rgba(0, 0, 0, 0.15);
    --rank-bg:                  var(--color-ui-black);
    --rank-color:               var(--color-text-white);
    --leaderboard-card-head-bg: var(--color-ui-black-dk);
    --scanlines-opacity:        0;

    /* Profile hooks */
    --player-info-accent:         var(--color-brand-primary);
    --profile-image-border-color: var(--color-ui-white);

    /* Metric hooks */
    --metric-value-border-color: var(--color-border-light);

    /* Score list hooks */
    --score-item-bg:           transparent;
    --score-item-border-color: var(--color-border-light);
    --score-item-hover-shadow: rgba(0, 0, 0, 0.4);
    --player-score-color:      var(--color-ui-success);

    /* Friend hooks */
    --friend-card-border-color: var(--color-border-default);

    /* Badge hooks */
    --badge-bg:         var(--color-ui-primary);
    --badge-pinball-bg: #FF5722;
    --badge-unknown-bg: #999;

    /* Podium hooks */
    --podium-first-bg:  linear-gradient(333deg, rgba(255,172,37,1) 0%, rgba(254,207,51,1) 13%, rgba(254,224,51,1) 53%, rgba(255,172,37,1) 100%);
    --podium-second-bg: var(--color-ui-primary);
    --podium-third-bg:  var(--color-ui-success);
}

/* ── Base ── */
body {
    background-color: var(--color-bg-body);
    background-image: none;
    font-weight: var(--tw-light);
    font-style: normal;
}

/* ── Bootstrap nav overrides ── */
.nav-tabs {
    --bs-nav-tabs-border-width: var(--bs-border-width);
    --bs-nav-tabs-border-color: var(--bs-border-color);
    --bs-nav-tabs-border-radius: 0.125rem;
    --bs-nav-tabs-link-hover-border-color: var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);
    --bs-nav-tabs-link-active-color: var(--bs-emphasis-color);
    --bs-nav-tabs-link-active-bg: var(--color-ui-white);
    --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--color-ui-white);
    border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color);
}
.nav {
    --bs-nav-link-padding-x: 1rem;
    --bs-nav-link-padding-y: 0.5rem;
    --bs-nav-link-font-weight: normal;
    --bs-nav-link-color: var(--color-text-link-primary);
    --bs-nav-link-hover-color: var(--bs-link-hover-color);
    --bs-nav-link-disabled-color: var(--bs-secondary-color);
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
.nav-tabs .nav-link {
    margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width));
    border: var(--bs-nav-tabs-border-width) solid transparent;
    border-top-left-radius: 0.125rem;
    border-top-right-radius: 0.125rem;
    transform: skewX(-8deg);
}
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
    isolation: isolate;
    border-color: var(--color-ui-warning);
    background-color: var(--color-ui-warning);
}
.offcanvas,
.offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm {
    background-color: var(--color-ui-white);
}

/* ── Custom tab styles ── */
.tabs {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    background-image: var(--tabs-bg-gradient);
}
.tab-link {
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: none;
    border-radius: 160% 100px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.tab-link.active { background-color: var(--tab-link-active-bg); }
.tab-link:hover   { background-color: var(--tab-link-active-bg); }

.tab-pane { margin-top: 1rem; }
.tab-content {
    border-top: 1px solid #9d9d9d;
    border-radius: 4px;
    padding: 0;
    background-color: transparent;
    display: block;
}
.tab-content.active { display: block; }

/* ── Modal shell (structural only) ── */
.modal {}
.modal-content {}
img#modal-thumbnail { height: 440px; }

/* ── Utilities ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.hidden    { display: none; }
.alignFull { padding: 2.5rem; }

/* Text gradient utility — overlays set the background-image */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}
.gradient1 { background-image: var(--gradient-001); }
.gradient2 { background-image: var(--gradient-002); }
.gradient3 { background-image: var(--gradient-003); }

a:hover { text-decoration: underline; }

/* ── Backgrounds ── */
.bg-dark { background: rgb(5 5 5 / 50%); }

/* ── Flex layout helpers ── */
.flex-container  { display: flex; gap: 1rem; }
.flex-vertical   { flex-direction: column; }
.flex-horizontal { flex-direction: row; }
.align-start     { align-items: flex-start; }
.align-center    { align-items: center; }
.align-end       { align-items: flex-end; }
.align-stretch   { align-items: stretch; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }
.justify-evenly  { justify-content: space-evenly; }
.flex-grow       { flex-grow: 1; }
.flex-shrink     { flex-shrink: 1; }
.flex-no-shrink  { flex-shrink: 0; }
.flex-basis-auto { flex-basis: auto; }
.flex-basis-30   { flex-basis: 33.333%; }
.flex-basis-50   { flex-basis: 50%; }
.flex-basis-100  { flex-basis: 100%; }
.flex-item       { padding: 1rem; }
.flex-self-start   { align-self: flex-start; }
.flex-self-center  { align-self: center; }
.flex-self-end     { align-self: flex-end; }
.flex-self-stretch { align-self: stretch; }
.full-width     { width: 100%; }
.full-height    { height: 100%; }
.center-content { display: flex; align-items: center; justify-content: center; }
.wrap    { flex-wrap: wrap; }
.no-wrap { flex-wrap: nowrap; }
.gap-small { gap: 0.5rem; }
.gap-large { gap: 2rem; }

/* Layout blocks */
.lg-block {
    flex: 2;
    height: 100%;
    flex-direction: row;
    display: flex;
}
.md-block {
    flex: 1;
    border: 1px solid var(--color-border-light);
    overflow-y: auto;
}

/* ── Wave mask (structural CSS shape) ── */
.wave {
    --size: 8px;
    --m: 1;
    --p: calc(var(--m) * var(--size));
    --R: calc(var(--size) * sqrt(var(--m) * var(--m) + 1));
    mask:
        radial-gradient(var(--R) at left 50% bottom calc(var(--size) + var(--p)), #000 99%, #0000 101%)
            left calc(50% - 2 * var(--size)) bottom 0 / calc(4 * var(--size)) 51% repeat-x,
        radial-gradient(var(--R) at left 50% bottom calc(-1 * var(--p)), #0000 99%, #000 101%)
            left 50% bottom var(--size) / calc(4 * var(--size)) calc(51% - var(--size)) repeat-x,
        radial-gradient(var(--R) at left 50% top calc(var(--size) + var(--p)), #000 99%, #0000 101%)
            left calc(50% - 2 * var(--size)) top 0 / calc(4 * var(--size)) 51% repeat-x,
        radial-gradient(var(--R) at left 50% top calc(-1 * var(--p)), #0000 99%, #000 101%)
            left 50% top var(--size) / calc(4 * var(--size)) calc(51% - var(--size)) repeat-x;
}

/* ── Wavy box (CSS shape) ── */
.wavy-box {
    --s: 35px;
    --w: 350px;
    --c: var(--color-ui-warning-dk);
    width: round(var(--w), 2 * var(--s));
    aspect-ratio: 1;
    padding: var(--s);
    box-sizing: border-box;
    border-radius: calc(1.5 * var(--s));
    --R: calc(var(--s) / sqrt(2)) at;
    --g: radial-gradient(var(--R) 50%, var(--c) calc(100% - 1px), #0000)
         0 0 / calc(2 * var(--s)) calc(2 * var(--s));
    --_c: #0000 100%, var(--c) calc(100% + 1px);
    --_b: calc(2 * var(--s)) calc(51% - var(--s) / 2) repeat-x;
    background: var(--g),
        radial-gradient(var(--R) 50% calc(100% + var(--s) / 2), var(--_c))
            var(--s) calc(100% - var(--s) / 2) / var(--_b),
        radial-gradient(var(--R) 50% calc(var(--s) / -2), var(--_c))
            var(--s) calc(var(--s) / 2) / var(--_b);
    --_m: var(--s) / calc(51% - var(--s) / 2) calc(2 * var(--s)) repeat-y;
    mask: var(--g),
        radial-gradient(var(--R) calc(100% + var(--s) / 2) 50%, var(--_c))
            calc(100% - var(--s) / 2) var(--_m),
        radial-gradient(var(--R) calc(var(--s) / -2) 50%, var(--_c))
            calc(var(--s) / 2) var(--_m);
}

/* ── Scanlines (visual effect — controlled by --scanlines-opacity) ── */
.scanlines::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(to bottom, rgb(0 0 0), rgb(1 7 24) 1px, transparent 3px, transparent 2px);
    z-index: 2;
    pointer-events: none;
    opacity: var(--scanlines-opacity);
}

/* ── Typography ── */
p { margin: 0 auto; }

h1, h2, h3, h4, h5, h6 { color: var(--color-text-heading-primary); }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-family: var(--font-secondary); font-weight: var(--tw-medium); font-style: normal; }
h3 { margin: 0; }

label {
    font-family: var(--font-primary);
    font-weight: var(--tw-medium);
    font-style: normal;
    font-size: var(--text-title);
}
.form-label { margin-bottom: var(--layout-xs2); }
.table {}
.table > :not(caption) > * > * {}

ul { list-style: none; }

/* ── Page title ── */
.page-title { z-index: 9999; }
.page-title h1 { margin-bottom: 0; padding: 0; }
.page-title p {
    font-size: var(--text-title);
    font-family: var(--font-secondary);
    font-weight: var(--tw-light);
    margin-top: var(--layout-sm);
    letter-spacing: 1px;
}

/* ── Panels ── */
.list-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    margin: 0 auto;
    padding: 3.5rem 2rem 1.5rem;
}
.panel-container {
    overflow: hidden;
    padding: 4rem 2rem;
    background: none;
    display: flex;
    gap: 1rem;
    flex-direction: column;
    &.profile-content {
        @media (width >= 768px)  { flex-direction: row; }
        @media (width >= 1024px) { flex-direction: column; }
        @media (width >= 1200px) { flex-direction: column; }
    }
}

/* ── Cards ── */
.card {
    border: var(--border-standard);
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    border-radius: 2%;
    padding: 1.5rem;
}
.card.game  { background-color: var(--color-bg-card); }
.card .card { background-color: transparent; }
.card-body  { padding: 0; }

.card-title {
    margin-bottom: 0;
    padding: 0;
    & h1 {
        text-align: center;
        @media (width >= 768px) { text-align: left; }
    }
}
.card-content {
    width: 100%;
    padding: 1.5rem;
}
.card-content h3 {
    margin: 10px 0;
    text-align: left;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}
.card-content .score-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.card-content .score-list li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: clamp(0.8rem, 2.5vw, 2rem);
}
.card-content .score-list li:last-child { border-bottom: none; }

/* ── Profile page — grid container ── */
.profile-container {
    display: block;
    @media (width >= 992px) {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 2rem;
        align-items: start;
    }
}

/* Left column — full-width on mobile, sticks to top on desktop */
.profile-info {
    width: 100%;
    margin-bottom: 1.5rem;
    @media (width >= 992px) { margin-bottom: 0; }
}

/* Right column — stacks its children vertically in source order */
.stats-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

/* Sections inside stats-section — each takes full column width */
.recent-scores,
.registered-events,
.game-collection,
.popular-games {
    width: 100%;
}

/* Profile info sub-layout */
.profile-info-container {
    display: block;
    @media (width >= 992px) {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "player-id-card"
            "additional-info";
        gap: 1rem;
        --bs-gap: 1rem;
    }
}
.player-id-card { overflow: hidden; grid-area: player-id-card; }

.profile-details {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row;
    text-align: left;
    @media (width >= 568px) { flex: 1; }
    @media (width >= 768px) {
        flex-direction: column;
        text-align: center;
    }
}

.profile-image-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    & p { margin: 0.5rem auto 0; }
}
.profile-image {
    position: relative;
    width: 80%;
    height: 80%;
    object-fit: cover;
    z-index: 2;
    border-radius: 20%;
    margin-top: .25rem;
    border: 4px solid var(--profile-image-border-color);
}
.player-info {
    & h2 {
        font-size: 2rem;
        font-weight: 800;
        margin: 0;
        line-height: 2rem;
        @media (width >= 1024px) { font-size: 2rem; }
    }
    & p {
        font-size: 1.5rem;
        font-weight: 300;
        margin: 0 auto;
        letter-spacing: 1px;
        color: var(--player-info-accent);
    }
}

.stats-summary {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    flex-direction: column;
    & .metric {
        display: flex;
        flex-direction: row;
        align-items: end;
        text-align: center;
        justify-content: space-between;
        margin-top: .5rem;
        border-radius: 10px;
        padding: 0rem .5rem;
        & .metric-label {
            flex: 1;
            font-size: 1.25rem;
            text-align: left;
            font-weight: 400;
            letter-spacing: 0px;
        }
        & .metric-value {
            font-size: 1.25rem;
            font-weight: 600;
            text-align: right;
            padding: .25rem 1rem;
            background: transparent;
            border-radius: var(--border-radius-md);
            border: 1px solid var(--metric-value-border-color);
        }
    }
}

/* ── Standalone metric components (used outside stats-summary) ── */
.metric-title {
    position: relative;
    display: inline-block;
}
.metric-title h3 {
    font-size: 1.5rem;
    font-weight: 500;
    border-bottom: 0px dashed;
    margin-bottom: .25rem;
    letter-spacing: 0px;
}
.metric-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}
.metric-label {
    flex: 1;
    font-size: 1.25rem;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0px;
}
.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: right;
    padding: .25rem 1rem;
    background: transparent;
    border-radius: 10px;
    border: 1px solid var(--metric-value-border-color);
}

/* ── Profile panels (left / right) ── */
.left-panel {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.5rem;
}
.right-panel {}

/* ── Recent scores — score cards ── */
.score-list {
    list-style: none;
    margin: 0;
    padding: 0 1rem 1rem 1rem;
}
.score-card {
    flex: 1 1 calc(100% - 32px);
    box-sizing: border-box;
    border-radius: 4px;
    padding: .5rem;
    border: 0 solid var(--color-border-light);
    @media (width >= 768px) { flex: 1 1 calc(50% - 32px); }
    @media (width >= 992px) {
        flex: 1 1 calc(33.333% - 32px);
        max-width: 33.333%;
        min-width: 240px;
    }
    @media (width >= 1024px) {
        flex: 1 1 calc(50% - 32px);
        max-width: 50%;
        min-width: 240px;
    }
}
.score-card-head {
    display: none;
    position: relative;
    background-position: center;
    background-size: cover;
    border-radius: 4px 4px 0 0;
    height: 88px;
    overflow: hidden;
    & .layer {
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: 1;
        background-color: transparent;
        background-image: none;
        border-radius: 4px 4px 0 0;
    }
}
.score-card-body {
    padding: 1rem .5rem .5rem;
    position: relative;
    background-image: none;
    & h4 {
        margin: 0;
        font-size: 2rem;
        font-weight: 600;
        letter-spacing: 0px;
        text-transform: uppercase;
        font-style: italic;
        line-height: 24px;
    }
}
.game-info {
    display: flex;
    justify-content: space-between;
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 1rem;
    text-transform: uppercase;
}
.score-footer {
    text-align: left;
    font-size: 2rem;
    padding: 0.75rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin: 0 .25rem;
}
.player-value {
    & h2 {
        font-size: 1.25rem;
        font-weight: 800;
        &::before {
            -webkit-text-stroke: var(--player-name-stroke-width) var(--player-name-stroke-color);
            content: attr(data-name);
            position: absolute;
            z-index: -1;
        }
    }
}
.score-value { font-size: 1.5rem; font-weight: 800; }

/* Standalone player name / score for flat score lists */
.player-name {
    flex-grow: 1;
    text-align: left;
}
.player-score {
    font-weight: bold;
    color: var(--player-score-color);
}

/* ── Score item — flat row layout (leaderboard list style) ── */
.score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: .5rem;
    margin-bottom: .5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 1px solid var(--score-item-border-color);
    font-size: 1.5rem;
    margin: 0;
    background-color: var(--score-item-bg);
}
.score-item div { padding: 0 1rem; letter-spacing: 2px; }
.score-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem .75rem var(--score-item-hover-shadow);
}
li.score-item.card { background: rgb(0 0 0 / 30%); }

/* Column sizing within score items */
.score-number {
    flex: 0 0 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}
.game-name {
    flex: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-nickname { flex: 1; text-align: center; }
.score-date {}

/* ── Registered events — tournament list ── */
.tournament-list {
    padding: 0 0 var(--spacing-md2) 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0;
    background: transparent;
    @media (width >= 992px) { padding: 0 var(--spacing-md2) var(--spacing-md2); }
    & .nav-tabs { font-size: 1.25rem; }
    & .metric {
        padding: 0;
        gap: 1rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-top: .5rem;
        border-radius: .5rem;
        flex-direction: column;
        @media (width >= 1024px) { flex-direction: row; }
        & .metric-date {
            border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
            display: flex;
            flex-direction: column;
            text-align: center;
            gap: 0;
            line-height: 1.75rem;
            font-size: 1.25rem;
            font-weight: 600;
            padding: .25rem 1rem;
            background: var(--color-ui-black);
            color: var(--color-text-white);
            align-self: stretch;
            align-items: center;
            justify-content: center;
            &.past {
                background: var(--color-ui-black-lt);
                color: var(--color-text-black);
                border-right: 1px solid #751010;
                text-decoration: line-through;
            }
            & .month { font-size: 1.25rem; }
            & .date  { font-size: 2rem; line-height: 24px; }
            & .day   { font-size: 1rem; }
        }
    }
    & .location-info {
        display: flex;
        flex-direction: column;
        line-height: 1.5rem;
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        font-family: var(--font-secondary);
        text-align: center;
        @media (width >= 1024px) { text-align: left; }
        & .event-name  { font-size: 1.5rem; font-weight: bold; letter-spacing: 1px; margin-bottom: .25rem; }
        & .event-time  { font-size: 1.25rem; letter-spacing: 1px; font-weight: 400; }
        & .location    { font-size: 1.25rem; font-weight: 400; letter-spacing: 1px; }
        & .event-status {}
        & .event-paid {}
    }
}

/* ── Popular games — horizontal scroll list ── */
.popular-games ul {
    display: flex;
    gap: 8px;
    padding: 1rem;
    list-style: none;
    margin: 0;
    align-items: flex-start;
}
.popular-games li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 180px;
}
.popular-games .thumbnail {
    width: 140px;
    height: 140px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.popular-games .thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.popular-games .game-info { margin-top: 10px; font-size: 14px; }

/* ── popGame card grid (game browse) ── */
.popGame-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.popGame-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.popGame-card .container {
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.popGame-card .container img { width: 100%; display: block; }
.popGame-card .container::after {
    content: "";
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    border-radius: 20px 20px 0 0;
    opacity: 0.7;
    pointer-events: none;
}
.details { padding: 15px; text-align: center; }

/* ── Score entry form ── */
.score-form-container {
    max-width: 55%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    filter: contrast(1.2) brightness(1.1);
    box-shadow: inset 0 0 40px rgb(83 133 148 / 30%);
    border-radius: 210% / 20%;
    border: 6px solid var(--score-form-border-color);
    @media (max-width: 480px) {
        max-width: 100%;
        border-radius: 460% / 20%;
        margin-top: 12%;
    }
    @media (min-width: 568px) { max-width: 100%; }
}
.score-form-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(to bottom, rgb(0 0 0), rgb(1 7 24) 1px, transparent 3px, transparent 2px);
    z-index: 2;
    pointer-events: none;
    opacity: var(--scanlines-opacity);
}
.marquee-art {
    flex: 0 0 2.5rem;
    border: 2px solid var(--score-form-border-color);
    overflow: hidden;
    border-radius: .5rem;
    box-shadow: 0 .125rem .25rem rgba(255, 255, 255, 0.2);
    position: relative;
    display: block;
    max-width: 100%;
    height: auto;
    z-index: 1;
}
.marquee-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.marquee-art:hover img { transform: scale(1.1); }
.marquee-container {
    text-align: center;
    position: relative;
    margin: 1rem auto;
    z-index: 2;
    box-sizing: content-box;
    @media (max-width: 480px) { max-width: 100%; margin-top: -12%; }
    @media (min-width: 568px) { max-width: 72%; margin-top: 0; }
}
.score-form-container .marquee-art {
    width: 100%;
    border-radius: 20px;
    -webkit-mask: linear-gradient(135deg, #000c 40%, #000, #000c 60%) 100% 100% / 250% 250%;
    transition: transform 0.4s, -webkit-mask-position 0.4s;
    cursor: pointer;
    position: relative;
    height: auto;
}
.score-form-container .marquee-art:hover { -webkit-mask-position: 0 0; }

.score-form-content {
    animation: spaceInvadersEntry 1.5s ease-out forwards;
    opacity: 0;
}
.score-form-content .score-container {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin: 0 auto 1rem;
    flex-direction: column;
    max-width: 100%;
}
.score-form-container h2 {
    text-align: center;
    margin-bottom: 8px;
    margin-top: 4px;
    font-weight: 700;
    text-transform: uppercase;
    @media (max-width: 480px) { font-size: 2rem; }
}
.form-group.player-name-container {
    text-align: center;
    font-size: 2.75rem;
    color: var(--color-brand-primary);
    font-weight: 600;
    @media (min-width: 568px) { font-size: 56px; }
}
.score-form-container input,
.score-form-container select,
.score-form-container button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.score-container h5 { font-weight: 400; margin: 0 auto; }
.score-fields {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
#score-field {
    font-size: 60px;
    font-weight: bold;
    text-align: center;
    color: var(--score-digit-color);
    background: none;
    border: none;
    overflow: visible;
    white-space: nowrap;
    transition: font-size 0.3s ease;
}
#score-field span {
    display: inline-flex;
    font-size: inherit;
    transform: scale(1);
    transition: transform 0.3s ease-out;
    animation: var(--score-digit-animation, none);
}
#score-field span.comma { text-align: center; font-size: 1em; }
#score-field span.new-number {
    transform: scale(0.25) rotateX(-90deg);
    animation: flip-scale 0.5s ease-out forwards;
}
.number-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin: 0 auto;
    @media (min-width: 568px) { margin: 22px auto 0; align-items: center; }
}
.number-card, .reset-card, .delete-card, .end-card {
    color: var(--score-btn-color);
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-align: center;
    font-weight: 700;
    font-size: 3rem;
    @media (max-width: 480px) { font-size: 24px; }
    @media (min-width: 568px) { font-size: 48px; }
}
.number-card span,
.reset-card span,
.delete-card span,
.end-card span { padding: 0 24px; }
.number-card:hover span,
.reset-card:hover span,
.delete-card:hover span,
.end-card:hover span {
    position: relative;
    transform: scale(1.1);
    color: var(--score-btn-hover-color);
    box-shadow: #48e4d6 0 0 0 2px, inset #e5f9f7 0 0 0 2px, inset #bfecf7 0 0 0 1px;
}
.control-buttons div { display: inline-block; }
.upload-proof-container { text-align: center; }
.upload-proof-btn {
    background: none;
    color: var(--upload-btn-color);
    border: 2px solid var(--upload-btn-color);
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.upload-proof-btn:hover {
    background: var(--upload-btn-color);
    color: #151515;
}
.score-form-container label { margin-bottom: 0; }
.score-form-container button {
    background-color: var(--color-brand-primary);
    color: var(--color-text-black);
    cursor: pointer;
    border: 2px solid var(--color-brand-primary);
    max-width: 420px;
    margin: 48px auto;
    @media (max-width: 480px) { max-width: 100%; margin: 32px auto; }
}
.score-form-container button:hover { background-color: var(--color-ui-primary-dk); }
form p { margin: 0; }
canvas#starField {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}
.score-field.default-zero { color: #aaa; font-weight: normal; opacity: 0.7; }
.score-field.active { background-color: #333333; }
.controls { margin: 20px 0; }

/* Score box — numeric display in score form */
.score-box { padding: 0; text-align: center; }
.score-label { rotate: -2deg; }
.score-box .score-value {
    background-image: none;
    font-size: 1.75em;
    font-weight: bold;
    display: block;
    padding: 0;
    margin-top: -4px;
}

/* ── Leaderboard ── */
.leaderboard { width: 100%; margin: 0 auto; padding: 20px; }
.leaderboard-header {
    text-align: left;
    background-color: transparent;
    padding: 10px;
    font-size: 1.5rem;
}
.leaderboard-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}
.leaderboard-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 calc(50% - 32px);
    max-width: 50%;
    min-width: 240px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.leaderboard-card h3 {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    background: var(--leaderboard-card-head-bg);
    color: var(--color-text-white);
    padding: 1rem;
}
.leaderboard-card .card-thumbnail {
    background: var(--leaderboard-card-head-bg);
    max-height: 140px;
    overflow: hidden;
}
.leaderboard-card .card-thumbnail img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid var(--color-ui-secondary-dk);
    margin-bottom: 10px;
    display: block;
    position: relative;
    top: -90px;
}
.leaderboard-card .score-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;

    & li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease;

        &:nth-child(even) { background: rgba(255, 255, 255, 0.08); }
        &:hover           { background: rgba(254, 190, 80, 0.08); }

        & .rank {
            font-size: 1.25rem;
            font-weight: 700;
            min-width: 50px;
            text-align: left;
            background-color: var(--rank-bg);
            border-radius: 0.5rem;
            padding: .25rem;
            margin-right: 1rem;
        }
        & .player-name {
            font-size: 1.125rem;
            font-weight: 400;
            color: var(--color-text-white);
            flex: 1;
            margin-left: 1rem;
            text-align: left;
        }
        & .score-value {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            min-width: 140px;
            text-align: right;
            & .player-score {
                font-size: 1.75rem;
                font-weight: 800;
                line-height: 1.1;
                margin-bottom: 0.25rem;
            }
            & .score-date {
                font-size: 0.875rem;
                font-weight: 300;
                color: var(--color-text-gray);
                letter-spacing: 0.5px;
                display: none;
            }
        }

        /* Ranking medal colours */
        &:nth-child(1) {
            background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
            border: 1px solid rgba(255,215,0,0.4);
            & .rank, & .player-score { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.6); }
        }
        &:nth-child(2) {
            background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
            border: 1px solid rgba(192,192,192,0.4);
            & .rank, & .player-score { color: #c0c0c0; text-shadow: 0 0 6px rgba(192,192,192,0.5); }
        }
        &:nth-child(3) {
            background: linear-gradient(135deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05));
            border: 1px solid rgba(205,127,50,0.4);
            & .rank, & .player-score { color: #cd7f32; text-shadow: 0 0 6px rgba(205,127,50,0.5); }
        }
    }

    @media (width >= 992px) {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}
.leaderboard-card .score-list li:nth-child(2n) { background: none; }
.rank {
    flex: 0 0 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: var(--rank-bg);
    border-radius: .5rem;
    padding: .25rem;
    color: var(--rank-color);
    margin-right: 1rem;
}
.leaderboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px var(--leaderboard-hover-shadow);
}

/* ── Registration forms ── */
.registration-page {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin: 0 auto;
    padding: 56px;
    box-sizing: border-box;
    min-height: auto;
}
.user-form-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 8px;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin-right: 10%;
}
.form-content { display: block; }
.registration-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    margin: 0 auto;
    box-sizing: border-box;
}
.registration-form-container form {
    width: 100%;
    box-sizing: border-box;
}
.registration-form-container form > div { margin: 0; padding: 0; }
.registration-form-container h2 {
    font-weight: 300;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}
.registration-form-container input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}
.registration-form-container input:focus { border-color: var(--color-ui-focus); }
.input-sm { width: 150px; }
.input-md { width: 100%; min-width: 400px; max-width: 400px; }
.input-lg { width: 100%; min-width: 600px; max-width: 600px; }
.registration-form-container button {
    margin-top: 10px;
    padding: 10px 30px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.4s ease, padding 0.4s ease;
}
.registration-form-container button:hover { padding: 10px 50px; }
.error-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Badge components ── */
.badge-container {
    position: absolute;
    top: 0; right: 0;
    transform: translate(0%, -50%);
    z-index: 2;
}
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    background-color: var(--badge-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
    margin-right: .25rem;
}
.badge img  { border-radius: 50%; border: 2px solid var(--color-border-default); }
.badge.videogame { background-color: var(--badge-bg); }
.badge.pinball   { background-color: var(--badge-pinball-bg); }
.badge.unknown   { background-color: var(--badge-unknown-bg); }

/* ── Friends page ── */
.friends-page .user-friends-panel,
.challenges-page .user-challenges-panel {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.friend-requests-section h2 {
    font-weight: var(--tw-regular);
    font-size: var(--text-title);
    margin: 0 auto;
}
.friend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1rem;
    flex-wrap: wrap;
    display: flex;
}
.friend-card {
    display: flex;
    flex: 1 1 calc(25% - 1rem);
    box-sizing: border-box;
    background-color: transparent;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    border: 2px solid var(--friend-card-border-color);
}
.friend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    flex-direction: row;
    flex-flow: wrap;
}
.friend-text-and-avatar {
    display: flex;
    align-items: baseline;
    flex-direction: row;
    gap: 1rem;
    flex: 1 1 0%;
}
.friend-avatar {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.75rem;
    border-width: 2px;
    border-style: solid;
    padding: 1px;
}
.friend-text-block {
    flex-grow: 1;
    text-align: left;
    font-family: var(--font-primary);
}
.friend-display-name {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
}
h3.friend-display-name {
    font-size: var(--text-heading3);
    font-weight: var(--tw-bold);
    line-height: 2rem;
}
.friend-display-name a {
    text-decoration: none;
    transition: color 0.3s;
    color: var(--color-text-link-primary);
}
.friend-username {
    margin: 0;
    font-size: var(--text-title);
    font-weight: var(--tw-regular);
    letter-spacing: 1px;
}
.friend-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: transparent;
    gap: 1rem;
    padding: 0.75rem;
    flex: 1;
    min-width: 200px;
    border: 2px solid var(--friend-card-border-color);
}
.friend-action {
    padding: 0 0.75rem;
    font-size: var(--text-body);
    font-weight: var(--tw-regular);
    text-align: center;
    color: var(--color-text-link-secondary);
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.2s;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 .75rem;
}
.friend-action:hover          { background-color: transparent; }
.friend-action.delete         { background-color: transparent; }
.friend-action.delete:hover   { background-color: var(--color-ui-danger); }
button.friend-action {
    background: none;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}
button.friend-action img { width: 24px; height: 24px; display: block; }
.friend-footer {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    gap: 0.5rem;
}
.friend-footer .friend-action.challenge { width: 100%; }
.approve-friend-request { color: var(--color-ui-success); }

/* ── Podium ── */
.podium { display: flex; align-items: flex-end; }
.podium__item { width: 200px; }
.podium__rank {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
}
.podium__city   { text-align: center; padding: 0 .5rem; }
.podium__number { width: 27px; height: 75px; }
.podium .first  { min-height: 300px; background: var(--podium-first-bg); }
.podium .second { min-height: 200px; background: var(--podium-second-bg); }
.podium .third  { min-height: 100px; background: var(--podium-third-bg); }

/* ── Sticky note widget ── */
.note {
    position: absolute;
    width: 195px;
    height: 112px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .25);
    margin: 8px;
    border: 1px solid rgba(0, 0, 0, .25);
    right: 8px;
    top: 24px;
    text-align: center;
}
a.note { text-decoration: none; }
.sticky1 {
    transform: rotate(4deg);
    -webkit-transform: rotate(4deg);
    -moz-transform: rotate(-3.5deg);
}

/* ── Footer pagination ── */
.footer-pagination { margin: 2rem auto; }

/* ── Animations ── */
@keyframes spaceInvadersEntry {
    0%   { transform: scale(0) rotateX(45deg) skew(25deg, 10deg) translateY(-500px); opacity: 0; }
    40%  { transform: scale(1.2) rotateX(10deg) skew(10deg, 0deg) translateY(0); opacity: 1; }
    70%  { transform: scale(0.95) rotateX(0deg) skew(0deg, 0deg) translateY(0); }
    100% { transform: scale(1) rotateX(0deg) skew(0deg, 0deg) translateY(0); opacity: 1; }
}
@keyframes flip-scale {
    0%   { transform: scale(0.25) rotateX(-90deg); }
    50%  { transform: scale(1.25) rotateX(0deg); }
    100% { transform: scale(1) rotateX(0deg); }
}
.flip { animation: flip 0.5s ease; }
@keyframes flip {
    0%   { transform: rotateX(0deg); }
    50%  { transform: rotateX(-90deg); }
    100% { transform: rotateX(0deg); }
}

/* ── Responsive — score card mobile (≤480) ── */
@media (max-width: 480px) {
    .score-container { max-width: 90%; }
    .flex-container { flex-wrap: wrap; }
}

/* ── Responsive — tablet (481–768) ── */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .input-sm, .input-md, .input-lg { width: 100%; min-width: 100%; }
    .flex-container { flex-wrap: wrap; }
    .friend-text-and-avatar { gap: .75rem; }
    .friend-avatar          { width: 64px; height: 64px; }
    .friend-text-block      { text-align: left; }
    .friend-username        { margin: -.5rem auto 0; }
    .friend-card            { border-radius: 16px; padding: 1rem; }
    .friend-list-left-panel,
    .friend-list-right-panel { flex-basis: 100%; }
    .card-content .score-list { grid-template-columns: 1fr; gap: 1rem; }
    .leaderboard-grid { padding: 0 0.5rem; gap: 1.5rem; }
    .score-card { flex: 1 1 calc(100% - 30px); }
}

/* ── Responsive — medium screens (569+) ── */
@media (min-width: 568px) {
    .tab-content { padding: 1rem 1.5rem; }
    .score-container h4 { font-size: 48px; }
}

/* ── Responsive — score card mid (769–1024) ── */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .score-card { flex: 1 1 calc(50% - 30px); }
}

/* ── Responsive — desktop (992+) ── */
@media (min-width: 992px) {
    img#modal-thumbnail { display: block; }
}

@media (min-width: 1200px) {}
