/* =========================
   RESET / BASE
========================= */

body {
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

* {
    box-sizing: border-box;
    font-family: Plus Jakarta Sans, sans-serif;
    margin: 0;
    padding: 0;
}

button
{
    background-color: #314fa7;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    padding: 8px 15px;
}

/* =========================
   PAGE WRAPPER (CRITICAL)
========================= */

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 16px;
    min-height: 86vh;
color: white;
box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* =========================
   PROFILE PAGE
========================= */

.profile-page {
    width: 100%;
}

.profile-overview {
    display: flex;
    gap: 1rem;
font-family: Plus Jakarta Sans, sans-serif;
}

/* =========================
   PROFILE HEAD
========================= */

/* TOP ROW */
.profile-head .head {
    align-items: center;
    background-color: #1c212f;
    border: 1px solid #6f91ac;
    border-radius: 5px 5px 0 0;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 12px;
}

/* LEFT SIDE */
.head-left {
    align-items: center;
    display: flex;
    flex: 0 1 320px;
    gap: 12px;
    min-width: 0;
}

.head-center {
    align-items: center;
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    min-width: 0;
}

.head-right {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
}

/* IMAGE */
.profile-head .image {
    position: relative;
}

.profile-head .image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    vertical-align: middle;
}

/* LEVEL BADGE */
.profile-head .level {
    background-color: #28354b;
    border-radius: 2px;
    bottom: 0;
    color: #babec9;
    font-size: 14px;
    font-weight: 700;
    left: 50%;
    position: absolute;
    text-align: center;
    transform: translate(-50%, 50%);
    width: 35px;
}

/* TEXT BLOCK */
.profile-head .next {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* 🔥 THIS centers vertically with image */
    gap: 2px;                  /* tighter spacing like RivalsMeta */
}

/* NAME ROW */
.profile-head .name {
    align-items: center;
    color: #dde4ec;
    display: flex;
    gap: 5px;
font-size: 1.5rem;
}

/* ICON BUTTONS */
.icon-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #242836;
    border: 1px solid #2a3042;
    border-radius: 6px;
    transition: 0.2s;
}

.icon-btn:hover {
    border-color: #c855f7;
    background: #2b3145;
}

.social-icon {
    width: 14px;
    height: 14px;
}

/* CLUB */
.profile-head .club {
    color: #b5a4f3;
    font-size: 15px;
    font-weight: 600;
}

.club-link:hover {
    color: #e84f64;
}

/* LAST MATCH */
.profile-head .last-match {
color: #babec9;
    font-size: 14px;
}

.profile-head .last-match span {
    color: #fff;
}

.previous-rewards {
    color: #babec9;
    font-size: 12px;
    margin-top: 8px;
}

.trophy-summary {
    max-width: 250px;
    width: 100%;
}

.trophy-summary-head {
    align-items: center;
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.trophy-summary-head strong {
    color: #f2f5fb;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.2;
    text-align: center;
}

.showcase-open-btn {
    background: linear-gradient(180deg, #334361 0%, #24304a 100%);
    border: 1px solid #546988;
    border-radius: 999px;
    color: #e8efff;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
}

.showcase-open-btn:hover {
    background: linear-gradient(180deg, #40557d 0%, #293754 100%);
}

.showcase-preview {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, auto));
    justify-content: center;
    margin: 0 auto;
    max-width: 100%;
}

.showcase-preview-row {
    display: contents;
}

.showcase-preview-slot {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 0;
    width: 100%;
}

.showcase-preview-slot.is-top {
    display: flex;
    grid-column: auto;
    justify-self: auto;
    max-width: none;
}

.showcase-preview-actions {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.showcase-dot {
    align-items: center;
    background: linear-gradient(180deg, #b7c7de 0%, #61758e 100%);
    border: 1px solid #d4def0;
    border-radius: 50%;
    box-shadow: 0 6px 10px rgba(0, 0, 0, .18);
    color: #142036;
    cursor: default;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 26px;
}

.showcase-dot::after {
    background: rgba(20, 32, 54, .18);
    border-radius: 999px;
    bottom: -3px;
    content: '';
    height: 6px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 10px;
}

.showcase-dot.is-clickable {
    cursor: pointer;
}

.showcase-dot.is-active-slot {
    box-shadow: 0 0 0 1px rgba(142, 182, 255, .5), 0 6px 10px rgba(0, 0, 0, .18);
}

.showcase-dot.is-empty {
    background: rgba(28, 34, 49, .6);
    border-color: #445979;
}

.showcase-dot-rank {
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.showcase-dot.is-gold {
    background: linear-gradient(180deg, #ffd972 0%, #c8921d 100%);
    border-color: #ffe7a2;
}

.showcase-dot.is-silver {
    background: linear-gradient(180deg, #eef4ff 0%, #9facbf 100%);
    border-color: #f8fbff;
}

.showcase-dot.is-bronze {
    background: linear-gradient(180deg, #ffcfb3 0%, #b87345 100%);
    border-color: #ffe0cb;
}

.showcase-card {
    align-items: center;
    backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(38, 49, 72, .96) 0%, rgba(24, 30, 47, .96) 100%);
    border: 1px solid #445979;
    border-radius: 10px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, .18);
    display: flex;
    gap: 6px;
    min-height: 34px;
    padding: 5px 7px;
    position: relative;
    width: 100%;
}

.showcase-card.is-top-card {
    max-width: none;
}

.showcase-card.is-empty {
    background: rgba(28, 34, 49, .6);
    border-style: dashed;
    box-shadow: none;
    color: #74839f;
    justify-content: center;
}

.showcase-card.is-clickable {
    cursor: pointer;
}

.showcase-card.is-active-slot {
    border-color: #8eb6ff;
    box-shadow: 0 0 0 1px rgba(142, 182, 255, .45), 0 14px 24px rgba(0, 0, 0, .28);
}

.showcase-medal-disc {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #142036;
    display: inline-flex;
    flex: 0 0 22px;
    font-size: 10px;
    font-weight: 800;
    height: 22px;
    justify-content: center;
    line-height: 1;
    position: relative;
    width: 22px;
}

.showcase-medal-disc::after {
    background: rgba(20, 32, 54, .18);
    border-radius: 999px;
    bottom: -3px;
    content: '';
    height: 6px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 10px;
}

.showcase-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.showcase-title {
    color: #f2f5fb;
    font-size: 9px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.showcase-meta {
    color: #93a4c2;
    font-size: 8px;
    margin-top: 0;
}

.showcase-card.is-gold .showcase-medal-disc {
    background: linear-gradient(180deg, #ffd972 0%, #c8921d 100%);
    border-color: #ffe7a2;
}

.showcase-card.is-silver .showcase-medal-disc {
    background: linear-gradient(180deg, #eef4ff 0%, #9facbf 100%);
    border-color: #f8fbff;
}

.showcase-card.is-bronze .showcase-medal-disc {
    background: linear-gradient(180deg, #ffcfb3 0%, #b87345 100%);
    border-color: #ffe0cb;
}

.showcase-card.is-unplaced .showcase-medal-disc {
    background: linear-gradient(180deg, #b7c7de 0%, #61758e 100%);
    border-color: #d4def0;
}

.showcase-card.is-gold {
    border-color: rgba(219, 178, 79, .55);
}

.showcase-card.is-silver {
    border-color: rgba(159, 169, 190, .55);
}

.showcase-card.is-bronze {
    border-color: rgba(180, 123, 88, .58);
}

.showcase-slot-clear {
    align-items: center;
    background: rgba(10, 15, 24, .3);
    border: 1px solid rgba(133, 151, 181, .35);
    border-radius: 999px;
    color: #cdd9ee;
    cursor: pointer;
    display: inline-flex;
    font-size: 9px;
    font-weight: 700;
    margin-left: auto;
    padding: 4px 7px;
}

.showcase-slot-clear:hover {
    background: rgba(10, 15, 24, .5);
}

.showcase-modal[hidden] {
    display: none;
}

.showcase-modal {
    inset: 0;
    position: fixed;
    z-index: 1200;
}

.showcase-modal-backdrop {
    background: rgba(8, 10, 18, .78);
    inset: 0;
    position: absolute;
}

.showcase-modal-dialog {
    background: linear-gradient(180deg, #202536 0%, #171b27 100%);
    border: 1px solid #5a6784;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
    left: 50%;
    max-height: calc(100vh - 40px);
    max-width: 980px;
    overflow: auto;
    padding: 24px;
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
}

.showcase-modal-close {
    align-items: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 22px;
    height: 36px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 18px;
    top: 16px;
    width: 36px;
}

.showcase-modal-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-right: 48px;
}

.showcase-modal-head h2 {
    color: #f4f7fd;
    font-size: 28px;
    margin-bottom: 6px;
}

.showcase-modal-head p,
.showcase-save-state {
    color: #9aabc8;
    font-size: 13px;
}

.showcase-save-state {
    background: rgba(112, 138, 179, .12);
    border: 1px solid rgba(112, 138, 179, .28);
    border-radius: 999px;
    padding: 8px 12px;
}

.trophy-cabinet {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0)) 0 0 / 100% 100%,
        linear-gradient(180deg, #7b5736 0%, #4c3421 100%);
    border: 10px solid #5c3c24;
    border-radius: 22px;
    box-shadow: inset 0 0 0 2px rgba(255, 223, 176, .22), 0 20px 50px rgba(0, 0, 0, .34);
    overflow: hidden;
    padding: 28px 20px 22px;
    position: relative;
}

.trophy-glass {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .14) 8%, rgba(255, 255, 255, .03) 28%, rgba(255, 255, 255, .08) 46%, rgba(255, 255, 255, .02) 74%),
        rgba(185, 211, 255, .05);
    inset: 12px;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.showcase-shelf {
    background: linear-gradient(180deg, rgba(18, 22, 35, .48) 0%, rgba(9, 12, 18, .24) 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 18px;
    margin-bottom: 18px;
    padding: 18px;
    position: relative;
    z-index: 1;
}

.showcase-shelf:last-child {
    margin-bottom: 0;
}

.showcase-shelf::after {
    background: linear-gradient(180deg, #976746 0%, #5f3f28 100%);
    border-radius: 999px;
    bottom: -10px;
    box-shadow: 0 8px 14px rgba(0, 0, 0, .18);
    content: '';
    height: 10px;
    left: 18px;
    position: absolute;
    right: 18px;
}

.showcase-shelf-label {
    color: #ffd8b0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.showcase-shelf-top .showcase-display-slot {
    display: flex;
    justify-content: center;
    min-height: 84px;
}

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

.showcase-display-slot {
    min-height: 84px;
}

.showcase-display-slot .showcase-card {
    min-height: 84px;
}

.showcase-display-slot .showcase-title {
    font-size: 14px;
}

.showcase-display-slot .showcase-meta {
    font-size: 12px;
}

.showcase-display-slot .showcase-medal-disc {
    flex-basis: 42px;
    font-size: 16px;
    height: 42px;
    width: 42px;
}

.showcase-medal-bank {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.showcase-bank-card {
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
    width: 100%;
}

.showcase-card.is-assigned {
    opacity: .72;
}

.showcase-card.is-assigned .showcase-title::after {
    color: #7fd1ff;
    content: ' - On display';
    font-size: 10px;
    font-weight: 700;
}

.showcase-empty-copy {
    color: #7788a5;
    font-size: 12px;
    text-align: center;
}

body.showcase-modal-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .profile-head .head {
        align-items: stretch;
        flex-direction: column;
    }

    .head-left,
    .head-center,
    .head-right {
        flex: none;
        width: 100%;
    }

    .head-right {
        justify-content: flex-start;
    }

    .trophy-summary-head {
        align-items: stretch;
        flex-direction: column;
    }

    .showcase-open-btn {
        align-self: flex-start;
    }

    .showcase-middle-grid,
    .showcase-medal-bank,
    .showcase-preview-row {
        grid-template-columns: 1fr;
    }

    .showcase-modal-dialog {
        padding: 20px 16px;
    }
}

@media (max-width: 560px) {
    .showcase-modal-head {
        flex-direction: column;
    }

    .trophy-cabinet {
        padding: 20px 14px 18px;
    }

    .showcase-shelf {
        padding: 14px;
    }
}

/* RIGHT SIDE BUTTON */
.update-btn button {
    background-color: #314fa7;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    padding: 8px 15px;
}

/* =========================
   HEAD BOTTOM (TABS + SEASON)
========================= */

.head-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #2a3042;
margin-bottom: 1rem;
}

/* TABS */
.tabs {
    display: flex;
    height: 37px;
    justify-content: center;
    position: relative;
    width: 100%;
}

.select-season {
    margin-top: -6px;
}

.select-ladder {
    margin-top: -6px;
    margin-right: 8px;
}

.tabs-links {
    align-items: center;
    background-color: #1c212f;
border: 1px solid #6f91ac;
border-top: none;
    border-radius: 0 0 5px 5px;
    border-top-color: #6f91ac79;
    display: flex;
    flex-wrap: wrap;
    font-size: 15px;
    gap: 5px;
    left: 0;
    padding: 3px;
    position: absolute;
    top: -1px;
}

.tabs-links button {
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #1e2233;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    padding: 5px;
color: white;
}

.tabs-links button.active {
    background-color: #314fa7;
    color: #fff;
}

.new-flag {
    font-size: 10px;
    background: #314fa7;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* SEASON SELECT */
.select-season select,
.select-ladder select {
background-color: #81a7c5;
    border: 1px solid #6f91ac;
    border-radius: 0 0 5px 5px;
    color: #fff;
    color: #1e2233;
    font-size: 15px;
    font-weight: 600;
    min-width: 115px;
    outline: none;
    padding: 6px;
    width: 100%;
}

.link-ind {
    align-items: center;
    background-color: #2b3245;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    display: flex;
    height: 100%;
    justify-content: center;
    position: absolute;
    right: 0;
    width: 20px;
}

.current-season {
    color: purple;
    font-weight: 600;
}

/* =========================
   PAGE WRAPPER
========================= */

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* =========================
   MAIN LAYOUT
========================= */

.profile-overview {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-top: 16px;
}

/* =========================
   CONNECTIONS
========================= */

.connections {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
}

.conn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.conn.discord {
    background: #5865F2;
}

.conn.twitch {
    background: #9146FF;
}

.conn:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

/* =========================
   BALANCES
========================= */

.head-right {
    display: flex;
    align-items: center;
}

.balance-wrapper {
    display: flex;
    gap: 8px;
}

.balance-box {
    background: #171b27;
    border: 1px solid #2a3042;
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* Coins */
.balance-box.coins i {
    color: #ffd66b;
}

/* Gems */
.balance-box.gems i {
    color: #6bd0ff;
}
