:root {
    --bg-main: #13151b;
    --bg-panel: #181b22;
    --bg-card: #1f232d;
    --bg-card-hover: #262b38;
    --border-color: #272c38;
    --accent-yellow: #f39c12;
    --accent-yellow-glow: rgba(243, 156, 18, 0.3);
    --text-main: #ffffff;
    --text-muted: #7e8494;
    --success-green: #2ecc71;
    --danger-red: #e74c3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    height: 64px;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-weight: 800;
    font-size: 18px;
    color: var(--accent-yellow);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-pill {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topup-btn {
    background-color: var(--accent-yellow);
    color: #111;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.topup-btn:hover {
    opacity: 0.9;
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* MAIN CONTAINER */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* UPGRADE STAGE SECTION */
.upgrade-stage {
    display: grid;
    grid-template-columns: 1fr 340px 1fr;
    gap: 20px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    min-height: 280px;
    align-items: center;
}

.stage-box {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.box-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.box-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.box-header small {
    font-size: 11px;
    color: var(--text-muted);
}

.box-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

.box-preview img {
    max-height: 85px;
    object-fit: contain;
    margin-bottom: 6px;
}

.box-preview .item-title {
    font-size: 13px;
    font-weight: 600;
}

.box-preview .item-price {
    font-size: 12px;
    color: var(--accent-yellow);
    font-weight: 700;
}

.balance-slider-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.balance-slider {
    width: 100%;
    accent-color: var(--accent-yellow);
    cursor: pointer;
}

/* ========================================
   UPGRADE WHEEL
======================================== */

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.upgrade-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* OUTER DECORATIVE TICKS */

.wheel-ticks {
    position: absolute;
    width: 292px;
    height: 292px;
    border-radius: 50%;

    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(255,255,255,0.13) 0deg 0.6deg,
            transparent 0.6deg 7.5deg
        );

    -webkit-mask:
        radial-gradient(
            circle,
            transparent 0 137px,
            #000 138px 145px,
            transparent 146px
        );

    mask:
        radial-gradient(
            circle,
            transparent 0 137px,
            #000 138px 145px,
            transparent 146px
        );

    opacity: 0.65;
}

/* SVG */

.progress-ring {
    position: absolute;
    width: 300px;
    height: 300px;

    /*
       SVG 0 starts on the right.
       Rotating 90 degrees puts our
       center point at the bottom.
    */
    transform: rotate(90deg);
    overflow: visible;
}

.ring-bg {
    fill: none;
    stroke: #25272c;
    stroke-width: 27;

    filter:
        drop-shadow(0 0 1px rgba(255,255,255,0.05));
}

.ring-progress {
    fill: none;

    stroke: url(#winGradient);
    stroke-width: 25;

    stroke-linecap: butt;

    filter:
        drop-shadow(0 0 5px rgba(255, 214, 0, 0.18));

    transition:
        stroke-dasharray 0.35s ease,
        stroke-dashoffset 0.35s ease;
}

/* INNER SEGMENTED RING */

.inner-ring {
    position: absolute;

    width: 205px;
    height: 205px;

    border-radius: 50%;

    background:
        repeating-conic-gradient(
            from 2deg,
            #101217 0deg 7deg,
            #1d2026 7deg 8deg
        );

    -webkit-mask:
        radial-gradient(
            circle,
            transparent 0 87px,
            #000 88px 102px
        );

    mask:
        radial-gradient(
            circle,
            transparent 0 87px,
            #000 88px 102px
        );

    opacity: 1;

    filter:
        drop-shadow(0 0 3px rgba(0,0,0,0.7));
}

/* CENTER */

.wheel-center-content {
    position: absolute;

    width: 160px;
    height: 160px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #1c1f24 0%,
            #181a1f 72%,
            #15171b 100%
        );

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    z-index: 4;

    box-shadow:
        inset 0 0 25px rgba(0,0,0,0.35);
}

.chance-value {
    font-size: 36px;
    line-height: 1;

    font-weight: 800;

    color: #baff16;

    letter-spacing: -1.5px;

    text-shadow:
        0 0 10px rgba(186,255,22,0.12);
}

.chance-label {
    margin-top: 7px;

    font-size: 11px;
    font-weight: 700;

    color: #9ee514;

    text-transform: uppercase;

    opacity: 0.9;
}

/* CHANCE BOUNDARY LABELS */

.chance-boundary {
    position: absolute;

    min-width: 34px;
    text-align: center;

    color: #9a9da3;

    font-size: 10px;
    line-height: 1;
    font-weight: 700;

    z-index: 12;

    pointer-events: none;

    text-shadow:
        0 1px 3px rgba(0,0,0,0.9);
}

/* NEEDLE */

.needle-group {
    position: absolute;

    width: 100%;
    height: 100%;

    left: 0;
    top: 0;

    transform-origin: 50% 50%;

    z-index: 10;

    pointer-events: none;
}

.needle-line {
    position: absolute;

    left: 50%;
    bottom: -1px;

    width: 2px;
    height: 31px;

    transform: translateX(-50%);

    background: linear-gradient(
        to top,
        #ff4d16 0%,
        #ff9800 45%,
        #fff000 100%
    );

    box-shadow:
        0 0 4px rgba(255, 100, 0, 0.8),
        0 0 9px rgba(255, 210, 0, 0.45);
}

.needle-arrow {
    position: absolute;

    left: 50%;
    bottom: 18px;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 20px solid #fff000;

    filter:
        drop-shadow(0 0 3px #ff9d00)
        drop-shadow(0 0 6px rgba(255, 100, 0, 0.7));
}
/* ACTION BAR SECTION */
.action-bar-section {
    display: flex;
    gap: 16px;
    align-items: center;
}

.upgrade-execute-btn {
    flex: 1;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #111;
    border: none;
    height: 52px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
    transition: transform 0.1s, opacity 0.2s;
}

.upgrade-execute-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.multiplier-controls {
    display: flex;
    gap: 8px;
}

.mult-btn {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0 16px;
    height: 52px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.mult-btn:hover, .mult-btn.active {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.mult-btn.icon-only {
    padding: 0 16px;
}

/* INVENTORY & SHOP SECTION */
.inventory-shop-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-box {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 440px;
}

.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tab-toggles {
    display: flex;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: var(--accent-yellow);
    color: #111;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.input-with-icon {
    position: relative;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 34px;
}

.input-with-icon input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 12px;
    outline: none;
    width: 60px;
}

.input-with-icon.search-input input {
    width: 90px;
}

.input-with-icon i {
    color: var(--text-muted);
    font-size: 11px;
}

/* ITEMS GRID */
.items-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding-right: 4px;
}

.items-grid::-webkit-scrollbar {
    width: 6px;
}

.items-grid::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* MINI ITEM CARD */
.item-card-mini {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    height: 120px;
    justify-content: space-between;
}

.item-card-mini:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-yellow);
    transform: translateY(-2px);
}

.item-card-mini .price {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-yellow);
}

.item-card-mini .wear {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
}

.item-card-mini img {
    max-height: 48px;
    object-fit: contain;
    align-self: center;
    margin: 4px 0;
}

.item-card-mini .name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* TOASTS */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success-green); }
.toast.error { border-left: 4px solid var(--danger-red); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.logged-in-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.steam-login-btn {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text-main);
    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    padding: 8px 14px;

    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;

    transition: all 0.2s ease;
}

.steam-login-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

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

.profile-logo-link {
    text-decoration: none;
}

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

.profile-main-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;

    padding: 18px;

    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;

    gap: 14px;
}


/* USER */

.profile-user-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;

    padding: 18px;

    display: flex;
    align-items: center;

    gap: 16px;
}

.profile-avatar-large {
    width: 86px;
    height: 86px;

    border-radius: 12px;

    object-fit: cover;

    border: 2px solid var(--border-color);
}

.profile-user-info {
    min-width: 0;
}

.profile-name {
    font-size: 18px;
    font-weight: 800;

    color: var(--text-main);

    margin-bottom: 8px;
}

.profile-steam-id {
    color: var(--text-muted);

    font-size: 12px;

    word-break: break-all;
}


/* BALANCE */

.profile-balance-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;

    padding: 18px;

    display: flex;
    flex-direction: column;

    justify-content: space-between;
}

.profile-card-title {
    color: var(--text-muted);

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
}

.profile-balance-value {
    font-size: 30px;
    font-weight: 800;

    margin: 14px 0;

    color: var(--text-main);
}

.profile-balance-value i {
    color: var(--accent-yellow);

    font-size: 18px;
}

.profile-topup-btn {
    width: 100%;

    height: 42px;

    border: none;
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #f39c12,
            #e67e22
        );

    color: #111;

    font-weight: 800;

    cursor: pointer;
}


/* STATS */

.profile-stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;
}

.profile-stat-box {
    background: var(--bg-main);

    border:
        1px solid var(--border-color);

    border-radius: 12px;

    padding: 16px 10px;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    gap: 10px;
}

.stat-label {
    font-size: 11px;

    color: var(--text-muted);

    text-transform: uppercase;
}

.stat-value {
    font-size: 23px;
    font-weight: 800;
}

.stat-win {
    color: var(--success-green);
}

.stat-loss {
    color: var(--danger-red);
}


/* INVENTORY */

.profile-inventory-card {
    margin-top: 20px;

    background: var(--bg-panel);

    border:
        1px solid var(--border-color);

    border-radius: 14px;

    padding: 16px;

    min-height: 360px;
}

.profile-tabs {
    display: flex;

    gap: 8px;

    margin-bottom: 20px;
}

.profile-tab {
    border:
        1px solid var(--border-color);

    background: var(--bg-main);

    color: var(--text-muted);

    border-radius: 8px;

    padding: 9px 18px;

    font-weight: 700;

    cursor: pointer;
}

.profile-tab.active {
    background: var(--accent-yellow);

    color: #111;

    border-color: var(--accent-yellow);
}

.profile-inventory-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;

    font-size: 13px;
    font-weight: 700;
}

.profile-inventory-total {
    color: var(--text-muted);
}

.profile-inventory-total span {
    color: var(--accent-yellow);
}


/* SKINS */

.profile-items-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(150px, 1fr));

    gap: 12px;
}

.profile-skin-card {
    height: 190px;

    background: var(--bg-card);

    border:
        1px solid var(--border-color);

    border-radius: 10px;

    padding: 12px;

    position: relative;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    transition: 0.2s;
}

.profile-skin-card:hover {
    border-color: var(--accent-yellow);

    transform: translateY(-2px);
}

.profile-skin-card img {
    height: 75px;
    width: 100%;

    object-fit: contain;
}

.profile-skin-price {
    color: var(--accent-yellow);

    font-size: 11px;
    font-weight: 800;
}

.profile-skin-name {
    color: var(--text-main);

    font-size: 11px;
    font-weight: 700;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.profile-empty,
.profile-loading {
    grid-column: 1 / -1;

    min-height: 220px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--text-muted);

    font-size: 13px;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .profile-main-card {
        grid-template-columns: 1fr;
    }

}

.profile-settings-btn {
    margin-top: 12px;

    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 7px;

    color: var(--text-muted);

    padding: 7px 11px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.profile-settings-btn:hover {
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}


/* SETTINGS MODAL */

.settings-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.72);

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 9999;

    backdrop-filter: blur(3px);
}

.settings-overlay.active {
    display: flex;
}

.settings-modal {
    width: 100%;
    max-width: 590px;

    background: var(--bg-panel);

    border: 1px solid var(--border-color);
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);
}

.settings-header {
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    border-bottom: 1px solid var(--border-color);
}

.settings-title {
    font-size: 20px;
    font-weight: 800;

    color: var(--text-main);
}

.settings-close {
    border: none;
    background: transparent;

    color: var(--text-muted);

    font-size: 20px;

    cursor: pointer;
}

.settings-close:hover {
    color: var(--text-main);
}

.settings-body {
    padding: 24px;
}

.settings-label {
    display: block;

    color: var(--text-main);

    font-size: 14px;
    font-weight: 800;

    margin-bottom: 7px;
}

.settings-description {
    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.5;

    margin-bottom: 14px;
}

.settings-input {
    width: 100%;

    height: 48px;

    box-sizing: border-box;

    padding: 0 14px;

    background: var(--bg-main);

    border: 1px solid var(--border-color);
    border-radius: 8px;

    color: var(--text-main);

    outline: none;

    font-size: 13px;
}

.settings-input:focus {
    border-color: var(--accent-yellow);
}

.trade-url-help {
    margin-top: 9px;

    color: var(--text-muted);

    font-size: 11px;
}

.settings-save-btn {
    width: 100%;
    height: 44px;

    margin-top: 20px;

    border: none;
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #f39c12,
            #e67e22
        );

    color: #111;

    font-weight: 800;

    cursor: pointer;
}

.settings-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-message {
    min-height: 18px;

    margin-top: 12px;

    font-size: 12px;
    font-weight: 700;
}

.settings-message.success {
    color: var(--success-green);
}

.settings-message.error {
    color: var(--danger-red);
}

/* ========================================
   UPGRADE HISTORY
======================================== */

.upgrade-history-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}


/* HISTORY CARD */

.upgrade-history-card {
    background: var(--bg-main);

    border:
        1px solid var(--border-color);

    border-radius: 14px;

    padding: 12px;

    min-width: 0;

    transition:
        border-color 0.2s,
        transform 0.2s;
}

.upgrade-history-card:hover {
    border-color: #3a404e;

    transform:
        translateY(-2px);
}


/* ITEMS */

.history-items {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        28px
        minmax(0, 1fr);

    align-items: center;

    gap: 6px;
}


.history-item {
    min-width: 0;
}


.history-image-box {
    height: 130px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            #262b36 0%,
            #1c2028 55%,
            #181b22 100%
        );

    border:
        1px solid #343a48;

    border-radius: 9px;

    overflow: hidden;
}


.history-item.target
.history-image-box {
    border-color:
        rgba(243, 156, 18, 0.5);

    background:
        radial-gradient(
            circle at center,
            #33281d 0%,
            #211e1b 50%,
            #181b22 100%
        );
}


.history-image-box img {
    width: 90%;
    height: 90px;

    object-fit: contain;

    position: relative;

    z-index: 2;
}


.history-placeholder {
    font-size: 46px;

    color: #555d6d;

    opacity: 0.7;
}


/* ARROW */

.history-arrow {
    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    font-size: 17px;
}


/* SKIN NAME */

.history-item-name {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    text-align: center;
}


/* WIN / LOSS */

.history-result {
    position: absolute;

    left: 7px;
    bottom: 7px;

    padding: 5px 7px;

    border-radius: 5px;

    font-size: 9px;
    font-weight: 800;

    z-index: 4;
}


.history-win {
    color: var(--success-green);

    background:
        rgba(46, 204, 113, 0.13);
}


.history-loss {
    color: var(--danger-red);

    background:
        rgba(231, 76, 60, 0.13);
}


/* BOTTOM INFORMATION */

.history-info {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;

    margin-top: 9px;
}


.history-info-box {
    min-height: 52px;

    background: var(--bg-card);

    border-radius: 8px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;
}


.history-info-box span {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 600;
}


.history-info-box strong {
    color: var(--text-main);

    font-size: 13px;
    font-weight: 800;
}


.history-info-box strong i {
    color: var(--accent-yellow);

    font-size: 10px;

    margin-left: 2px;
}


.history-info-box
.history-chance {
    color: var(--accent-yellow);

    font-size: 14px;
}


/* DATE / ROLL */

.history-footer {
    margin-top: 9px;

    padding-top: 9px;

    border-top:
        1px solid var(--border-color);

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 8px;

    color: var(--text-muted);

    font-size: 9px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .upgrade-history-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .upgrade-history-grid {
        grid-template-columns: 1fr;
    }

}

/* ========================================
   INVENTORY ACTIONS
======================================== */

.profile-skin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 6px;

    margin-top: 8px;
}


.skin-sell-btn,
.skin-withdraw-btn {
    height: 30px;

    border-radius: 6px;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    transition: 0.2s;
}


.skin-sell-btn {
    border:
        1px solid rgba(243, 156, 18, 0.45);

    background:
        rgba(243, 156, 18, 0.10);

    color: var(--accent-yellow);
}


.skin-sell-btn:hover {
    background:
        var(--accent-yellow);

    color: #111;
}


.skin-withdraw-btn {
    border:
        1px solid var(--border-color);

    background:
        var(--bg-main);

    color: var(--text-muted);
}


.skin-withdraw-btn:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}


/* ========================================
   SELL MODAL
======================================== */

.sell-overlay {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter:
        blur(3px);

    z-index: 10000;
}


.sell-overlay.active {
    display: flex;
}


.sell-modal {
    width: calc(100% - 40px);
    max-width: 420px;

    background:
        var(--bg-panel);

    border:
        1px solid var(--border-color);

    border-radius: 14px;

    padding: 28px;

    text-align: center;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.55);
}


.sell-modal-icon {
    width: 54px;
    height: 54px;

    margin:
        0 auto 16px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(243, 156, 18, 0.12);

    color:
        var(--accent-yellow);

    font-size: 22px;
}


.sell-modal-title {
    color:
        var(--text-main);

    font-size: 20px;
    font-weight: 800;

    margin-bottom: 10px;
}


.sell-modal-text {
    color:
        var(--text-muted);

    font-size: 13px;

    line-height: 1.6;
}


.sell-modal-text strong {
    color:
        var(--text-main);
}


.sell-price {
    color:
        var(--accent-yellow);

    font-weight: 800;

    white-space: nowrap;
}


.sell-modal-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;

    margin-top: 24px;
}


.sell-cancel-btn,
.sell-confirm-btn {
    height: 42px;

    border-radius: 8px;

    font-weight: 800;

    cursor: pointer;
}


.sell-cancel-btn {
    background:
        var(--bg-main);

    border:
        1px solid var(--border-color);

    color:
        var(--text-muted);
}


.sell-confirm-btn {
    border: none;

    background:
        linear-gradient(
            135deg,
            #f39c12,
            #e67e22
        );

    color: #111;
}


.sell-confirm-btn:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


.sell-message {
    min-height: 18px;

    margin-top: 12px;

    font-size: 11px;
    font-weight: 700;
}


.sell-message.success {
    color:
        var(--success-green);
}


.sell-message.error {
    color:
        var(--danger-red);
}

/* ========================================
   WITHDRAW MODAL
======================================== */

.withdraw-overlay {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(3px);

    z-index: 10000;
}


.withdraw-overlay.active {
    display: flex;
}


.withdraw-modal {
    width: 100%;
    max-width: 430px;

    background:
        var(--bg-panel);

    border:
        1px solid var(--border-color);

    border-radius: 14px;

    padding: 28px;

    text-align: center;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.55);
}


.withdraw-modal-icon {
    width: 54px;
    height: 54px;

    margin:
        0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(243, 156, 18, 0.12);

    color:
        var(--accent-yellow);

    font-size: 21px;
}


.withdraw-modal-title {
    margin-bottom: 14px;

    color:
        var(--text-main);

    font-size: 20px;
    font-weight: 800;
}


.withdraw-modal-text {
    color:
        var(--text-muted);

    font-size: 13px;

    line-height: 1.6;
}


.withdraw-loading {
    padding: 20px 0;

    color:
        var(--text-muted);

    font-size: 13px;
}


.withdraw-loading i {
    margin-right: 7px;

    color:
        var(--accent-yellow);
}


.withdraw-warning-icon {
    margin-bottom: 14px;

    color:
        var(--danger-red);

    font-size: 30px;
}


.withdraw-modal-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;

    margin-top: 24px;
}


.withdraw-back-btn,
.withdraw-settings-btn,
.withdraw-confirm-btn {
    height: 42px;

    border-radius: 8px;

    font-weight: 800;

    cursor: pointer;
}


.withdraw-back-btn {
    background:
        var(--bg-main);

    border:
        1px solid var(--border-color);

    color:
        var(--text-muted);
}


.withdraw-back-btn.full {
    grid-column: 1 / -1;
}


.withdraw-settings-btn,
.withdraw-confirm-btn {
    border: none;

    background:
        linear-gradient(
            135deg,
            #f39c12,
            #e67e22
        );

    color: #111;
}


.withdraw-confirm-skin {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 18px;

    padding: 12px;

    background:
        var(--bg-main);

    border:
        1px solid var(--border-color);

    border-radius: 10px;

    text-align: left;
}


.withdraw-confirm-skin img {
    width: 75px;
    height: 55px;

    object-fit: contain;
}


.withdraw-confirm-skin > i {
    width: 75px;

    color:
        var(--text-muted);

    font-size: 30px;
}


.withdraw-confirm-skin div {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 5px;
}


.withdraw-confirm-skin strong {
    color:
        var(--text-main);

    font-size: 12px;
}


.withdraw-confirm-skin span {
    color:
        var(--accent-yellow);

    font-size: 11px;
    font-weight: 800;
}


.withdraw-message {
    min-height: 18px;

    margin-top: 12px;

    font-size: 11px;
    font-weight: 700;
}


.withdraw-message.info {
    color:
        var(--accent-yellow);
}

.withdraw-message.success {
    color: var(--success-green);
}

.withdraw-message.error {
    color: var(--danger-red);
}

.wheel-result-win {
    color: #ffbf00 !important;
    font-size: 34px !important;
}

.wheel-result-loss {
    color: #ff4d4d !important;
    font-size: 34px !important;
}

/* ========================================
   SHOP SELECTION / PAGINATION
======================================== */

.item-card-mini.shop-selected {
    border-color: var(--accent-yellow);
    background:
        linear-gradient(
            180deg,
            rgba(243, 156, 18, 0.12),
            var(--bg-card)
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(243, 156, 18, 0.25),
        0 0 12px
        rgba(243, 156, 18, 0.10);

    transform: translateY(-2px);
}


/* SHOP BOTTOM BAR */

.shop-bottom-bar {
    height: 46px;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding-top: 10px;

    border-top:
        1px solid var(--border-color);
}


/* PAGINATION */

.shop-pagination {
    display: flex;
    align-items: center;

    gap: 8px;
}


.shop-page-btn {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border-color);

    border-radius: 8px;

    background:
        var(--bg-main);

    color:
        var(--text-main);

    cursor: pointer;

    transition: 0.2s;
}


.shop-page-btn:hover:not(:disabled) {
    border-color:
        var(--accent-yellow);

    color:
        var(--accent-yellow);
}


.shop-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.shop-page-info {
    min-width: 38px;

    text-align: center;

    color:
        var(--text-muted);

    font-size: 11px;
    font-weight: 700;
}


/* PURCHASE INFO */

.shop-purchase-info {
    display: flex;
    align-items: center;

    gap: 12px;

    color:
        var(--text-muted);

    font-size: 11px;
}


.shop-purchase-info strong {
    color:#f5b94f;
        
}


.shop-total {
    color:
        var(--accent-yellow);

    font-size: 13px;
    font-weight: 800;
}


.shop-total strong {
    color:
        var(--accent-yellow);
}


/* BUY BUTTON */

.shop-buy-btn {
    height: 34px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border: none;
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #f39c12,
            #e67e22
        );

    color: #111;

    font-size: 11px;
    font-weight: 800;

    cursor: pointer;

    transition:
        opacity 0.2s,
        transform 0.2s;
}


.shop-buy-btn:hover:not(:disabled) {
    transform:
        translateY(-1px);
}


.shop-buy-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.items-grid.shop-grid {
    overflow-y: hidden;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

/* ========================================
   COMPACT SHOP CARDS
======================================== */

.items-grid.shop-grid {
    overflow: hidden;

    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));

    gap: 6px;

    min-height: 0;
}


/* Smaller cards only inside Shop */

.shop-grid .item-card-mini {
    height: auto;
    min-height: 0;

    padding: 5px 6px;

    border-radius: 7px;

    transform: none;
}


/* Don't move cards when hovering */

.shop-grid .item-card-mini:hover {
    transform: none;
}


/* Don't move selected cards */

.shop-grid .item-card-mini.shop-selected {
    transform: none;
}


/* Smaller skin image */

.shop-grid .item-card-mini img {
    width: 100%;
    height: 32px;
    max-height: 32px;

    object-fit: contain;

    margin: 1px 0;
}


/* Smaller price */

.shop-grid .item-card-mini .price {
    font-size: 10px;
}


/* Smaller wear text */

.shop-grid .item-card-mini .wear {
    top: 7px;
    right: 8px;

    font-size: 8px;
}


/* Smaller skin name */

.shop-grid .item-card-mini .name {
    font-size: 10px;
}

/* =========================================================
   UPGRADER - DENSE DESKTOP LAYOUT
   ========================================================= */

.main-container {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;

    margin: 0 auto;

    padding: 26px 0 40px;

    gap: 10px;
}


/* =========================
   TOP UPGRADE AREA
   ========================= */

.upgrade-stage {
    display: grid;

    grid-template-columns:
        minmax(0, 320px)
        330px
        minmax(0, 320px);

    justify-content: center;
    align-items: center;

    gap: 38px;

    min-height: 350px;

    padding: 20px 28px;

    background: transparent;
    border: none;
    border-radius: 0;
}


/* SOURCE + TARGET BOXES */

.stage-box {
    width: 100%;
    height: 300px;

    padding: 18px;

    border-radius: 11px;

    background: var(--bg-panel);
    border: 1px solid var(--border-color);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12);
}


.box-header span {
    font-size: 12px;
    font-weight: 700;
}


.box-header small {
    margin-top: 3px;

    font-size: 10px;
}


/* Selected skin preview */

.box-preview img {
    max-width: 175px;
    max-height: 115px;

    object-fit: contain;
}


.box-preview .item-title {
    max-width: 240px;

    margin-top: 4px;

    font-size: 12px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.box-preview .item-price {
    margin-top: 4px;

    font-size: 12px;
}


/* =========================
   WHEEL
   ========================= */

.wheel-container {
    width: 330px;
    height: 330px;

    display: flex;
    justify-content: center;
    align-items: center;
}


/*
   Keep the wheel itself at its current 300px size.
   We are only giving it proper surrounding space.
*/

.upgrade-wheel {
    flex: 0 0 300px;
}


/* =========================
   ACTION ROW
   ========================= */

.action-bar-section {
    width: 100%;

    display: grid;

    grid-template-columns:
        320px
        330px
        320px;

    justify-content: center;
    align-items: center;

    gap: 38px;

    margin-top: -2px;
}


/*
   Put Upgrade button underneath wheel
*/

.upgrade-execute-btn {
    grid-column: 2;

    width: 100%;
    height: 48px;

    flex: none;

    border-radius: 9px;

    font-size: 15px;
}


/*
   Controls occupy target-skin column
*/

.multiplier-controls {
    grid-column: 3;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 5px;
}


.mult-btn {
    width: 100%;
    min-width: 0;

    height: 42px;

    padding: 0 7px;

    border-radius: 8px;

    font-size: 11px;
}


.mult-btn.icon-only {
    padding: 0;
}


/* =========================
   BOTTOM PANELS
   ========================= */

.inventory-shop-section {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 8px;

    margin-top: 4px;
}


.panel-box {
    height: 390px;

    padding: 10px;

    gap: 8px;

    border-radius: 10px;
}


/* =========================
   PANEL TOOLBARS
   ========================= */

.panel-toolbar {
    min-height: 38px;

    gap: 8px;
}


.tab-toggles {
    flex-shrink: 0;

    padding: 2px;

    border-radius: 8px;
}


.tab-btn {
    min-height: 30px;

    padding: 5px 10px;

    font-size: 11px;
}


.filter-group {
    min-width: 0;

    justify-content: flex-end;

    gap: 5px;
}


.input-with-icon {
    height: 31px;

    padding: 0 8px;

    border-radius: 7px;
}


.input-with-icon input {
    width: 48px;

    font-size: 10px;
}


.input-with-icon.search-input input {
    width: 75px;
}


/* =========================
   ALL LOWER SKIN GRIDS
   ========================= */

.items-grid {
    min-height: 0;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 5px;

    padding-right: 2px;
}


/*
   Compact cards on BOTH sides,
   not only Shop.
*/

.items-grid .item-card-mini {
    height: 74px;
    min-height: 74px;

    padding: 5px 6px;

    border-radius: 7px;

    transform: none;
}


.items-grid .item-card-mini:hover {
    transform: none;
}


.items-grid .item-card-mini img {
    width: 100%;
    height: 40px;
    max-height: 40px;

    margin: 0;

    object-fit: contain;
}


.items-grid .item-card-mini .price {
    font-size: 9px;
}


.items-grid .item-card-mini .wear {
    top: 5px;
    right: 6px;

    font-size: 7px;
}


.items-grid .item-card-mini .name {
    font-size: 9px;

    line-height: 11px;
}


/* =========================
   SHOP: EXACTLY 5 x 4
   ========================= */

.items-grid.shop-grid {
    overflow: hidden;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    grid-template-rows:
        repeat(4, 74px);

    align-content: start;

    gap: 5px;
}


/* Selected Shop card */

.shop-grid .item-card-mini.shop-selected {
    transform: none;

    border-color: var(--accent-yellow);

    box-shadow:
        inset 0 0 0 1px
        rgba(243, 156, 18, 0.30),
        0 0 10px
        rgba(243, 156, 18, 0.08);
}


/* =========================
   SHOP BOTTOM BAR
   ========================= */

.shop-bottom-bar {
    height: 42px;
    min-height: 42px;

    padding-top: 7px;

    gap: 8px;
}


.shop-page-btn {
    width: 31px;
    height: 31px;

    border-radius: 7px;
}


.shop-page-info {
    min-width: 34px;

    font-size: 10px;
}


.shop-purchase-info {
    gap: 8px;

    font-size: 10px;
}


.shop-total {
    font-size: 12px;
}


.shop-buy-btn {
    height: 31px;

    padding: 0 14px;

    border-radius: 7px;

    font-size: 10px;
}


/* =========================
   DESKTOP SCALING
   ========================= */

@media (max-width: 1220px) {

    .main-container {
        width: calc(100% - 24px);
    }

    .upgrade-stage {
        grid-template-columns:
            minmax(260px, 1fr)
            310px
            minmax(260px, 1fr);

        gap: 18px;
    }

    .action-bar-section {
        grid-template-columns:
            minmax(260px, 1fr)
            310px
            minmax(260px, 1fr);

        gap: 18px;
    }

    .wheel-container {
        width: 310px;
    }
}

/* =========================================================
   DESKTOP SIZE / POSITION TUNING
   ========================================================= */

.main-container {
    width: min(1380px, calc(100% - 40px));
    max-width: 1380px;

    padding-top: 10px;
    gap: 8px;
}


/* Make the whole upper game area larger */

.upgrade-stage {
    grid-template-columns:
        350px
        360px
        350px;

    gap: 55px;

    min-height: 350px;

    padding-top: 8px;
    padding-bottom: 8px;
}


/* Larger source / target areas */

.stage-box {
    height: 310px;
}


/* Give wheel a little more breathing room */

.wheel-container {
    width: 360px;
    height: 330px;
}


/* Align button + controls to the same columns above */

.action-bar-section {
    grid-template-columns:
        350px
        360px
        350px;

    gap: 55px;

    margin-top: -12px;
}


/* Upgrade button closer to reference proportions */

.upgrade-execute-btn {
    height: 50px;
}


/* Controls slightly larger */

.mult-btn {
    height: 44px;
}


/* Bring inventories directly underneath */

.inventory-shop-section {
    gap: 8px;

    margin-top: 2px;
}


/* Larger lower panels */

.panel-box {
    height: 410px;

    padding: 10px;
}

/* =========================================================
   FIX 5 x 4 LOWER GRIDS
   ========================================================= */

.panel-box {
    height: 430px;
}


/* Reserve exact space for 4 rows */

.items-grid {
    height: 311px;
    min-height: 311px;
    max-height: 311px;

    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, 74px);

    gap: 5px;

    align-content: start;
}


/* SHOP */

.items-grid.shop-grid {
    height: 311px;
    min-height: 311px;
    max-height: 311px;

    overflow: hidden;

    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, 74px);
}


/* Make sure cards never get compressed */

.items-grid .item-card-mini {
    height: 74px;
    min-height: 74px;
    max-height: 74px;
}


/* Keep shop footer below the cards */

.shop-bottom-bar {
    flex-shrink: 0;

    height: 42px;
    min-height: 42px;
}

/* ========================================
   TARGET SKIN PAGINATION
======================================== */

#rightGrid {
    overflow: hidden;

    height: 311px;
    min-height: 311px;
    max-height: 311px;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    grid-template-rows:
        repeat(4, 74px);

    gap: 5px;

    align-content: start;
}


.target-bottom-bar {
    height: 42px;
    min-height: 42px;

    display: flex;
    align-items: center;

    padding-top: 7px;

    border-top:
        1px solid var(--border-color);

    flex-shrink: 0;
}

.shop-clear-btn {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border-color);
    border-radius: 7px;

    background: var(--bg-main);
    color: var(--text-muted);

    cursor: pointer;

    transition: 0.2s;
}

.shop-clear-btn:hover:not(:disabled) {
    color: #ff4d4d;
    border-color: #ff4d4d;
}

.shop-clear-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* SHOP / TARGET FILTERS */

.price-label-box {
    width: 76px;
    height: 31px;

    display: flex;
    align-items: center;

    padding: 0 10px;

    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 400;

    user-select: none;
}

.price-filter-input {
    width: 76px;
}

.price-filter-input input {
    width: 42px;
    min-width: 0;
}

.price-filter-input i {
    margin-left: auto;
    color: var(--accent-yellow);
    font-size: 10px;
}

.price-filter-input input::-webkit-outer-spin-button,
.price-filter-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-filter-input input[type=number] {
    -moz-appearance: textfield;
}

.filter-empty-message {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 100%;

    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== SERVER STATS ==================== */

.server-stats {
    display: flex;
    align-items: center;

    gap: 28px;

    margin-left: 25px;
}

.server-stat {
    display: flex;
    align-items: center;

    gap: 9px;
}

.server-stat > i {
    color: var(--accent-yellow);
    font-size: 17px;
}

.server-stat > div {
    display: flex;
    flex-direction: column;

    line-height: 1.15;
}

.server-stat-label {
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 500;

    text-transform: uppercase;
}

.server-stat-value {
    color: var(--text-main);

    font-size: 14px;
    font-weight: 700;

    margin-top: 3px;
}

/* =========================================================
   LIVE UPGRADE WINS SIDEBAR
   ========================================================= */

.live-wins-sidebar::-webkit-scrollbar {
    width: 4px;
}

.live-wins-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}


.live-wins-title {
    height: 34px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 10px;

    margin-bottom: 6px;

    background: var(--bg-panel);

    border: 1px solid var(--border-color);

    border-radius: 8px;

    color: var(--text-main);

    font-size: 11px;
    font-weight: 800;
}


.live-wins-title i {
    color: var(--accent-yellow);
}


/* ==================== CARDS ==================== */

.live-win-card {
    position: relative;

    width: 100%;

    margin-bottom: 6px;

    overflow: hidden;

    background:
        linear-gradient(
            110deg,
            color-mix(
                in srgb,
                var(--rarity-color) 18%,
                var(--bg-card)
            ),
            var(--bg-card) 72%
        );

    border-radius: 8px;

    border-left:
        3px solid
        var(--rarity-color);
}


/* ==================== BEST WIN ==================== */

.live-win-best {
    min-height: 150px;

    padding: 10px;
}


.live-win-best::after {
    content: '';

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 75% 35%,
            color-mix(
                in srgb,
                var(--rarity-color) 20%,
                transparent
            ),
            transparent 55%
        );

    pointer-events: none;
}


.live-best-label {
    position: relative;

    z-index: 2;

    display: flex;
    align-items: center;

    gap: 6px;

    color: var(--accent-yellow);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .4px;
}


.live-best-label i {
    font-size: 11px;
}


.live-best-image {
    position: relative;

    z-index: 2;

    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.live-best-image img {
    max-width: 130px;
    max-height: 68px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 5px 8px
            rgba(0, 0, 0, .35)
        );
}


.live-best-bottom {
    position: relative;

    z-index: 2;

    display: flex;

    justify-content: space-between;

    margin-top: 5px;

    color: var(--accent-yellow);

    font-size: 10px;
    font-weight: 800;
}


/* ==================== RECENT WINS ==================== */

.live-win-recent {
    height: 82px;

    padding: 7px 8px;
}


.live-win-chance {
    position: relative;

    z-index: 2;

    color: var(--text-main);

    font-size: 9px;
    font-weight: 800;
}


.live-win-chance i {
    color: var(--accent-yellow);

    margin-right: 3px;

    font-size: 9px;
}


.live-win-row {
    position: relative;

    z-index: 2;

    height: 57px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;
}


.live-win-info {
    min-width: 0;

    flex: 1;
}


.live-win-name {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: var(--text-main);

    font-size: 10px;
    font-weight: 800;
}


.live-win-rarity {
    margin-top: 3px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 8px;
    font-weight: 700;
}


.live-win-image {
    width: 72px;
    height: 48px;

    object-fit: contain;

    flex-shrink: 0;

    filter:
        drop-shadow(
            0 3px 4px
            rgba(0, 0, 0, .3)
        );
}


/* ==================== EMPTY / LOADING ==================== */

.live-wins-loading,
.live-wins-empty {
    padding: 20px 8px;

    text-align: center;

    color: var(--text-muted);

    background: var(--bg-panel);

    border: 1px solid var(--border-color);

    border-radius: 8px;

    font-size: 10px;
}


/* Hide sidebar if screen becomes too narrow */

@media (max-width: 1500px) {

    .live-wins-sidebar {
        display: none;
    }

}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    width: calc(100% - 32px);

    margin: 60px 16px 16px;

    padding: 34px 40px 26px;

    background: #17191f;

    border: 1px solid var(--border-color);
    border-radius: 12px;

    color: var(--text-main);
}


.footer-main {
    display: grid;

    grid-template-columns:
        1.2fr
        1fr
        1fr
        1.3fr
        auto;

    gap: 55px;

    align-items: start;

    min-height: 115px;
}


/* LOGO */

.footer-logo {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: #fff;

    text-decoration: none;

    font-size: 19px;
    font-weight: 900;

    letter-spacing: .5px;
}


.footer-logo-icon {
    color: var(--accent-yellow);

    font-size: 25px;

    display: flex;
    align-items: center;
}


/* COLUMNS */

.footer-column {
    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 8px;
}


.footer-title {
    margin-bottom: 3px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
}


.footer-column a {
    color: #d9dce3;

    text-decoration: none;

    font-size: 11px;
    font-weight: 500;

    transition: color .2s;
}


.footer-column a:hover {
    color: var(--accent-yellow);
}


/* SOCIALS */

.footer-socials {
    display: flex;

    align-items: center;

    gap: 8px;
}


.footer-socials a {
    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #22252c;

    color: #8e939f;

    text-decoration: none;

    font-size: 14px;

    transition:
        color .2s,
        background .2s,
        transform .2s;
}


.footer-socials a:hover {
    color: #111;

    background: var(--accent-yellow);

    transform: translateY(-2px);
}


/* DIVIDER */

.footer-divider {
    height: 1px;

    margin: 8px 0 25px;

    background: var(--border-color);
}


/* BOTTOM */

.footer-bottom {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.footer-copyright {
    color: #fff;

    font-size: 11px;
    font-weight: 600;
}


.footer-disclaimer {
    color: #444954;

    font-size: 10px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .footer-main {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 30px;
    }

    .footer-socials {
        grid-column: 1 / -1;
    }
}


@media (max-width: 600px) {

    .site-footer {
        padding: 25px 20px;

        margin-left: 8px;
        margin-right: 8px;

        width: calc(100% - 16px);
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-socials {
        grid-column: auto;
    }
}


.live-wins-sidebar {
    position: fixed;

    top: 72px;
    left: 8px;

    width: 190px;
    max-height: calc(100vh - 82px);

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 4px;

    pointer-events: auto;

    transition: transform 0.15s linear;
}

/* Fancy bottom edge for Live Upgrades */

.live-wins-sidebar {
    border-radius: 8px 8px 14px 14px;

    /* allows the cards to scroll, but keeps the bottom shape clean */
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black calc(100% - 24px),
        transparent 100%
    );

    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black calc(100% - 24px),
        transparent 100%
    );

    padding-bottom: 18px;
}

/* =========================================================
   LEGAL PAGES
   ========================================================= */

.legal-page {
    min-height: 70vh;

    padding:
        70px
        20px
        20px;
}


.legal-container {
    width: min(
        850px,
        100%
    );

    margin: 0 auto;

    padding: 35px 40px;

    background: var(--bg-panel);

    border:
        1px solid
        var(--border-color);

    border-radius: 12px;
}


.legal-back {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 30px;

    color: var(--text-muted);

    text-decoration: none;

    font-size: 11px;

    transition: color .2s;
}


.legal-back:hover {
    color: var(--accent-yellow);
}


.legal-container h1 {
    margin: 0;

    color: var(--text-main);

    font-size: 27px;
}


.legal-updated {
    margin:
        7px
        0
        35px;

    color: var(--text-muted);

    font-size: 10px;
}


.legal-container section {
    margin-bottom: 27px;
}


.legal-container section:last-child {
    margin-bottom: 0;
}


.legal-container h2 {
    margin:
        0
        0
        8px;

    color: var(--text-main);

    font-size: 14px;
}


.legal-container p {
    margin: 0;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.8;
}

/* =========================================================
   LEGAL PAGE + LIVE WINS LAYOUT FIX
   ========================================================= */

.legal-body .legal-page {
    padding-left: 220px;
}

.legal-body .legal-container {
    width: min(850px, calc(100vw - 280px));
}

/* Smaller screens */

@media (max-width: 1100px) {

    .legal-body .legal-page {
        padding-left: 20px;
    }

    .legal-body .legal-container {
        width: min(850px, 100%);
    }
}

/* ========================================
   GLOBAL LIVE WINS SIDEBAR
   Attached to webpage, NOT viewport
======================================== */

#liveWinsSidebar {
    position: absolute !important;

    top: 72px !important;
    left: 8px !important;

    width: 190px;

    height: auto !important;

    z-index: 50;

    overflow: hidden !important;

    padding-right: 4px;
    padding-bottom: 18px;

    border-radius: 8px 8px 14px 14px;

    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black calc(100% - 30px),
        transparent 100%
    );

    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black calc(100% - 30px),
        transparent 100%
    );
}

#liveWinsSidebar .live-wins-content {
    height: auto !important;
    overflow: visible !important;
}

/* =========================================================
   PROVABLY FAIR PAGE
   ========================================================= */

.provably-page {
    min-height: 720px;

    padding:
        48px
        220px
        70px;
}


.provably-container {
    width: min(1160px, 100%);

    margin: 0 auto;

    overflow: hidden;

    background: var(--bg-panel);

    border:
        1px solid
        var(--border-color);

    border-radius: 12px;
}


/* ==================== INTRO ==================== */

.provably-intro {
    padding: 30px 34px 26px;

    background:
        rgba(255, 255, 255, .015);

    border-bottom:
        1px solid
        var(--border-color);
}


.provably-heading {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}


.provably-heading h1 {
    margin: 0;

    color: var(--text-main);

    font-size: 22px;
    font-weight: 900;

    letter-spacing: .3px;
}


.provably-shield {
    width: 30px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #00d27a;

    font-size: 25px;
}


.provably-intro p {
    max-width: 1000px;

    margin:
        0
        0
        5px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 500;

    line-height: 1.6;
}


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

.provably-content {
    padding: 25px 34px;
}


.provably-tabs {
    display: inline-flex;

    margin-bottom: 27px;

    padding: 3px;

    background: var(--bg-card);

    border-radius: 9px;
}


.provably-tab {
    height: 35px;

    padding: 0 18px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;

    cursor: default;
}


.provably-tab.active {
    background:
        linear-gradient(
            135deg,
            var(--accent-yellow),
            var(--accent-orange)
        );

    color: #111;
}


.provably-content h2 {
    margin:
        0
        0
        13px;

    color: var(--text-main);

    font-size: 18px;
}


/* ==================== TABLE ==================== */

.provably-table {
    overflow: hidden;

    border:
        1px solid
        var(--border-color);

    border-radius: 11px;
}


.provably-row {
    min-height: 57px;

    display: grid;

    grid-template-columns:
        200px
        minmax(0, 1fr)
        320px;

    align-items: stretch;

    border-bottom:
        1px solid
        var(--border-color);
}


.provably-row:last-child {
    border-bottom: 0;
}


.provably-label {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding: 0 16px;

    background:
        rgba(255, 255, 255, .025);

    border-right:
        1px solid
        var(--border-color);

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;
}


.provably-label i {
    color: var(--text-muted);

    font-size: 12px;
}


.provably-value {
    min-width: 0;

    display: flex;

    align-items: center;

    padding: 0 16px;

    color: var(--text-main);

    font-size: 11px;
    font-weight: 600;

    overflow-wrap: anywhere;
}


.provably-hidden-value {
    color: var(--text-muted);

    letter-spacing: 1px;
}


.provably-hash {
    color: #aeb6c7;

    font-family:
        Consolas,
        monospace;

    font-size: 10px;
}


.provably-actions {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    padding: 8px 12px;
}


.provably-actions button,
.provably-reveal button {
    min-height: 35px;

    padding: 0 15px;

    border: 0;
    border-radius: 8px;

    font-size: 10px;
    font-weight: 700;
}


.provably-secondary-btn {
    background: #24272e;

    color: var(--text-main);
}


.provably-accent-dark-btn {
    background:
        rgba(255, 171, 0, .14);

    color: var(--accent-yellow);
}


/* Visually disabled for now, without making them look dead */

.provably-actions button:disabled,
.provably-reveal button:disabled {
    opacity: 1;

    cursor: default;
}


/* ==================== REVEAL ==================== */

.provably-reveal {
    min-height: 56px;

    margin-top: 16px;

    padding: 8px 10px 8px 16px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    background: var(--bg-card);

    border-radius: 10px;

    color: var(--text-muted);

    font-size: 10px;
}


.provably-reveal button {
    flex-shrink: 0;

    background:
        linear-gradient(
            135deg,
            var(--accent-yellow),
            var(--accent-orange)
        );

    color: #111;

    padding: 0 20px;
}


/* ==================== RESPONSIVE ==================== */

@media (max-width: 1100px) {

    .provably-page {
        padding:
            35px
            20px
            60px;
    }

}


@media (max-width: 800px) {

    .provably-row {
        grid-template-columns: 150px 1fr;
    }

    .provably-actions {
        grid-column: 1 / -1;

        border-top:
            1px solid
            var(--border-color);
    }

}


@media (max-width: 550px) {

    .provably-page {
        padding:
            20px
            10px
            40px;
    }

    .provably-intro,
    .provably-content {
        padding:
            20px
            16px;
    }

    .provably-row {
        grid-template-columns: 1fr;
    }

    .provably-label {
        min-height: 38px;

        border-right: 0;

        border-bottom:
            1px solid
            var(--border-color);
    }

    .provably-value {
        min-height: 48px;
    }

    .provably-reveal {
        align-items: stretch;

        flex-direction: column;
    }

    .provably-reveal button {
        height: 38px;
    }
}

/* ==================== PROVABLY FAIR - SEED HISTORY MODAL ==================== */

.seed-history-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.seed-history-overlay.active {
    display: flex;
}

.seed-history-modal {
    width: min(760px, 100%);
    max-height: 82vh;

    display: flex;
    flex-direction: column;

    background: #17181c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);

    overflow: hidden;
}

.seed-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}

.seed-history-header h3 {
    margin: 0;

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;
}

.seed-history-close {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #777b84;
    font-size: 18px;

    cursor: pointer;

    transition: 0.2s ease;
}

.seed-history-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.seed-history-content {
    padding: 18px 12px 18px 18px;

    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: #3a3d44 transparent;
}


/* Chrome / Edge / Brave */

.seed-history-content::-webkit-scrollbar {
    width: 7px;
}

.seed-history-content::-webkit-scrollbar-track {
    background: transparent;
}

.seed-history-content::-webkit-scrollbar-thumb {
    background: #3a3d44;

    border-radius: 10px;

    border: 2px solid transparent;
    background-clip: padding-box;

    transition: background 0.2s ease;
}

.seed-history-content::-webkit-scrollbar-thumb:hover {
    background: #f0b90b;
    background-clip: padding-box;
}

.seed-history-loading,
.seed-history-empty,
.seed-history-error {
    padding: 40px 20px;

    text-align: center;

    color: #777b84;
}

.seed-history-card {
    margin-bottom: 14px;

    overflow: hidden;

    background: #1d1f24;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 12px;
}

.seed-history-card:last-child {
    margin-bottom: 0;
}

.seed-history-row {
    display: grid;

    grid-template-columns:
        170px minmax(0, 1fr);

    min-height: 58px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}

.seed-history-row:last-child {
    border-bottom: 0;
}

.seed-history-label {
    display: flex;
    align-items: center;

    padding: 15px 17px;

    color: #898d96;

    font-size: 14px;
    font-weight: 600;

    border-right:
        1px solid rgba(255, 255, 255, 0.07);
}

.seed-history-value {
    display: flex;
    align-items: center;

    min-width: 0;

    padding: 15px 17px;

    color: #e7e7e9;

    font-size: 13px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.seed-history-value.seed-code {
    font-family:
        Consolas,
        Monaco,
        monospace;

    color: #c8c9cd;
}

.seed-history-value.seed-revealed {
    color: #f0b90b;
}

@media (max-width: 650px) {

    .seed-history-overlay {
        padding: 12px;
    }

    .seed-history-row {
        grid-template-columns: 1fr;
    }

    .seed-history-label {
        border-right: 0;

        border-bottom:
            1px solid rgba(255, 255, 255, 0.05);
    }
}

/* ==================== PROVABLY FAIR - BUTTON THEME ==================== */

/* Every clickable button on Provably Fair */
.provably-body button:not(:disabled) {
    cursor: pointer;
}

.provably-body button:disabled {
    cursor: not-allowed;
}


/* ==================== TABS ==================== */

.provably-tabs {
    gap: 6px;
}

.provably-tab {
    min-height: 42px;

    padding: 0 18px;

    background: #171a20;

    border: 1px solid #2b3039;
    border-radius: 9px;

    color: #8d95a3;

    font-weight: 700;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.provably-tab:hover {
    background: #1d2128;
    border-color: #3a404b;

    color: #ffffff;
}

.provably-tab.active {
    background: #ff9818;
    border-color: #ff9818;

    color: #111318;

    box-shadow:
        0 4px 14px rgba(255, 152, 24, 0.14);
}


/* ==================== SECONDARY BUTTONS ==================== */

.provably-secondary-btn,
.provably-accent-dark-btn {
    min-height: 40px;

    padding: 0 16px;

    background: #171a20;

    border: 1px solid #2b3039;
    border-radius: 9px;

    color: #a3aab5;

    font-weight: 700;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.provably-secondary-btn:not(:disabled):hover,
.provably-accent-dark-btn:not(:disabled):hover {
    background: #20242c;
    border-color: #414854;

    color: #ffffff;
}

.provably-secondary-btn:not(:disabled):active,
.provably-accent-dark-btn:not(:disabled):active {
    transform: translateY(1px);
}


/* Disabled buttons */

.provably-secondary-btn:disabled,
.provably-accent-dark-btn:disabled {
    opacity: 0.42;
}


/* ==================== REVEAL SERVER SEED ==================== */

#rotateSeedButton {
    min-height: 44px;

    padding: 0 22px;

    background: #ff9818;

    border: 1px solid #ff9818;
    border-radius: 9px;

    color: #111318;

    font-size: 14px;
    font-weight: 800;

    box-shadow:
        0 4px 14px rgba(255, 152, 24, 0.15);

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

#rotateSeedButton:hover:not(:disabled) {
    background: #ffa329;
    border-color: #ffa329;

    box-shadow:
        0 5px 18px rgba(255, 152, 24, 0.22);
}

#rotateSeedButton:active:not(:disabled) {
    transform: translateY(1px);
}

#rotateSeedButton:disabled {
    opacity: 0.55;
}

/* ==================== PROVABLY FAIR - SEED ACTION BUTTONS ==================== */

.provably-seed-action-btn {
    min-height: 40px;

    padding: 0 16px;

    background: #ff9818;

    border: 1px solid #ff9818;
    border-radius: 9px;

    color: #111318;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 4px 14px rgba(255, 152, 24, 0.12);

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.provably-seed-action-btn:hover {
    background: #ffa329;
    border-color: #ffa329;

    box-shadow:
        0 5px 18px rgba(255, 152, 24, 0.20);
}

.provably-seed-action-btn:active {
    transform: translateY(1px);
}

.provably-seed-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ==================== CHANGE CLIENT SEED MODAL ==================== */

.seed-change-modal {
    width: min(560px, 100%);

    background: #17181c;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);

    overflow: hidden;
}

.seed-change-content {
    padding: 22px;
}

.seed-change-field {
    margin-bottom: 20px;
}

.seed-change-field label {
    display: block;

    margin-bottom: 9px;

    color: #8d95a3;

    font-size: 13px;
    font-weight: 700;
}

.seed-change-current {
    padding: 13px 14px;

    background: #111318;

    border: 1px solid #2b3039;
    border-radius: 9px;

    color: #c8c9cd;

    font-family: Consolas, Monaco, monospace;
    font-size: 13px;

    overflow-wrap: anywhere;
}

#newClientSeedInput {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 14px;

    background: #111318;

    border: 1px solid #2b3039;
    border-radius: 9px;
    outline: none;

    color: #ffffff;

    font-size: 14px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

#newClientSeedInput::placeholder {
    color: #606774;
}

#newClientSeedInput:focus {
    border-color: #ff9818;

    box-shadow:
        0 0 0 3px rgba(255, 152, 24, 0.10);
}

.seed-change-hint {
    display: block;

    margin-top: 7px;

    color: #606774;

    font-size: 12px;
}

.seed-change-error {
    display: none;

    margin-bottom: 16px;
    padding: 11px 13px;

    background: rgba(255, 70, 70, 0.08);

    border: 1px solid rgba(255, 70, 70, 0.18);
    border-radius: 8px;

    color: #ff7777;

    font-size: 13px;
}

.seed-change-error.active {
    display: block;
}

.seed-change-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 4px;
    padding: 13px 14px;

    background: rgba(255, 152, 24, 0.06);

    border: 1px solid rgba(255, 152, 24, 0.14);
    border-radius: 9px;

    color: #8d95a3;

    font-size: 12px;
    line-height: 1.5;
}

.seed-change-warning i {
    margin-top: 2px;

    color: #ff9818;
}

.seed-change-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 22px;
}

.seed-change-cancel {
    min-height: 40px;

    padding: 0 17px;

    background: #171a20;

    border: 1px solid #2b3039;
    border-radius: 9px;

    color: #a3aab5;

    font-weight: 700;

    cursor: pointer;
}

.seed-change-cancel:hover {
    background: #20242c;
    color: #ffffff;
}

/* ==================== PROVABLY FAIR - VERIFY UPGRADE ==================== */

.provably-tab-content-hidden {
    display: none;
}

.verify-description {
    margin: -4px 0 24px;

    color: #777f8c;

    font-size: 14px;
    line-height: 1.6;
}

.verify-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    padding: 22px;

    background: #17181c;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.verify-field {
    min-width: 0;
}

.verify-field-full {
    grid-column: 1 / -1;
}

.verify-field label {
    display: block;

    margin-bottom: 8px;

    color: #8d95a3;

    font-size: 13px;
    font-weight: 700;
}

.verify-field input {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 14px;

    background: #111318;

    border: 1px solid #2b3039;
    border-radius: 9px;

    outline: none;

    color: #ffffff;

    font-family: Consolas, Monaco, monospace;
    font-size: 13px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.verify-field input::placeholder {
    color: #555c68;
}

.verify-field input:focus {
    border-color: #ff9818;

    box-shadow:
        0 0 0 3px rgba(255, 152, 24, 0.10);
}

.verify-actions {
    display: flex;

    justify-content: flex-end;

    margin-top: 18px;
}

#verifyUpgradeButton {
    min-width: 150px;
}

.verify-result {
    display: none;

    margin-top: 18px;
}


@media (max-width: 700px) {

    .verify-grid {
        grid-template-columns: 1fr;
    }

    .verify-field-full {
        grid-column: auto;
    }

}

/* ==================== PROVABLY FAIR - VERIFY RESULT ==================== */

.verify-result-card {
    overflow: hidden;

    background: #17181c;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.verify-result-card.verified {
    border-color: rgba(70, 200, 120, 0.25);
}

.verify-result-card.failed {
    border-color: rgba(255, 80, 80, 0.25);
}

.verify-result-title {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 16px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);

    color: #ffffff;

    font-size: 15px;
    font-weight: 800;
}

.verify-result-card.verified
.verify-result-title i {
    color: #49c97b;
}

.verify-result-card.failed
.verify-result-title i {
    color: #ff6262;
}

.verify-result-row {
    display: grid;

    grid-template-columns:
        170px minmax(0, 1fr);

    min-height: 52px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);
}

.verify-result-row:last-child {
    border-bottom: 0;
}

.verify-result-row > span {
    display: flex;
    align-items: center;

    padding: 13px 16px;

    color: #777f8c;

    font-size: 13px;

    border-right:
        1px solid rgba(255, 255, 255, 0.06);
}

.verify-result-row code,
.verify-result-row strong {
    display: flex;
    align-items: center;

    min-width: 0;

    padding: 13px 16px;

    color: #d7d9dd;

    font-size: 13px;

    overflow-wrap: anywhere;
    word-break: break-all;
}

.verify-result-row code {
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.verify-good {
    color: #49c97b !important;
}

.verify-bad {
    color: #ff6262 !important;
}

.verify-error-box {
    padding: 14px 16px;

    background:
        rgba(255, 70, 70, 0.07);

    border:
        1px solid rgba(255, 70, 70, 0.20);

    border-radius: 9px;

    color: #ff7777;

    font-size: 13px;
}


@media (max-width: 700px) {

    .verify-result-row {
        grid-template-columns: 1fr;
    }

    .verify-result-row > span {
        border-right: 0;

        border-bottom:
            1px solid rgba(255, 255, 255, 0.04);
    }

}

/* ==================== VERIFY UPGRADE - ROLL SEARCH ==================== */

.verify-roll-section {
    max-width: 650px;

    margin: 48px auto 20px;

    text-align: center;
}

.verify-roll-section h2 {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: 22px;
    font-weight: 800;
}

.verify-roll-section p {
    max-width: 480px;

    margin: 0 auto 24px;

    color: #777f8c;

    font-size: 14px;
    line-height: 1.55;
}

.verify-roll-search {
    display: flex;
    align-items: stretch;
    gap: 12px;

    max-width: 540px;

    margin: 0 auto;
}

#verifyRollId {
    flex: 1;
    min-width: 0;

    padding: 0 15px;

    background: #171a20;

    border: 1px solid #303640;
    border-radius: 9px;

    outline: none;

    color: #ffffff;

    font-size: 14px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

#verifyRollId::placeholder {
    color: #555c68;
}

#verifyRollId:focus {
    border-color: #ff9818;

    box-shadow:
        0 0 0 3px rgba(255, 152, 24, 0.10);
}

#verifyRollButton {
    min-width: 120px;
    min-height: 46px;

    font-size: 14px;
}

.verify-roll-message {
    display: none;

    max-width: 540px;

    margin: 15px auto 0;

    font-size: 13px;
}

.verify-roll-section .verify-result {
    max-width: 650px;

    margin: 24px auto 0;

    text-align: left;
}


@media (max-width: 600px) {

    .verify-roll-section {
        margin-top: 30px;
    }

    .verify-roll-search {
        flex-direction: column;
    }

    #verifyRollId {
        min-height: 46px;
    }

}

.verify-upgrade-summary {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;
    gap: 18px;

    padding: 18px;

    background: #121419;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}

.verify-upgrade-summary > div {
    min-width: 0;
}

.verify-upgrade-summary span {
    display: block;

    margin-bottom: 5px;

    color: #666e7b;

    font-size: 11px;
    text-transform: uppercase;
}

.verify-upgrade-summary strong {
    color: #ffffff;

    font-size: 13px;
}

.verify-upgrade-summary > i {
    color: #ff9818;
}

.verify-pending-note {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 15px 17px;

    color: #8d95a3;

    font-size: 13px;
}

.verify-pending-note i {
    color: #ff9818;
}

/* ==================== SKIN RARITY GLOW ==================== */

.item-card-mini {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.item-card-mini::before {
    content: "";
    position: absolute;

    width: 115px;
    height: 85px;

    left: 50%;
    top: 48%;

    transform: translate(-50%, -50%);

    background: var(--rarity-color, #6b7280);

    border-radius: 50%;

    filter: blur(28px);

    opacity: 0.32;

    pointer-events: none;

    z-index: 0;
}

.item-card-mini > * {
    position: relative;
    z-index: 1;
}

.item-card-mini img {
    position: relative;
    z-index: 1;
}

/* ==================== PROFILE SKIN RARITY GLOW ==================== */

.profile-skin-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.profile-skin-card::before {
    content: "";
    position: absolute;

    width: 150px;
    height: 110px;

    left: 50%;
    top: 42%;

    transform: translate(-50%, -50%);

    background: var(--rarity-color, #6b7280);

    border-radius: 50%;

    filter: blur(35px);

    opacity: 0.30;

    pointer-events: none;

    z-index: 0;
}

.profile-skin-card > * {
    position: relative;
    z-index: 1;
}

/* ==================== SELECTED SKIN RARITY GLOW ==================== */

.selected-rarity-glow {
    position: relative;
    isolation: isolate;
}

.selected-rarity-glow::before {
    content: "";
    position: absolute;

    width: 240px;
    height: 155px;

    left: 50%;
    top: 42%;

    transform: translate(-50%, -50%);

    background: var(--rarity-color, #6b7280);

    border-radius: 50%;

    filter: blur(42px);

    opacity: 0.42;

    pointer-events: none;

    z-index: 0;
}

.selected-rarity-glow > * {
    position: relative;
    z-index: 1;
}

/* ==================== HISTORY INPUT RARITY GLOW ==================== */

.history-item.input .history-image-box {
    position: relative;
    isolation: isolate;
}

.history-item.input .history-image-box::before {
    content: "";
    position: absolute;

    width: 115px;
    height: 85px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: var(--rarity-color, #6b7280);

    border-radius: 50%;

    filter: blur(28px);
    opacity: 0.32;

    pointer-events: none;
    z-index: -1;
}

/* =========================================
   LOGGED-OUT LEFT PANEL
   ========================================= */

.left-login-required {
    grid-column: 1 / -1;

    width: 100%;
    min-height: 300px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 40px 20px;
}

.left-login-icon {
    font-size: 34px;
    margin-bottom: 16px;

    color: var(--text-muted);
    opacity: 0.75;
}

.left-login-title {
    font-size: 18px;
    font-weight: 700;

    color: var(--text-main);
    margin-bottom: 7px;
}

.left-login-text {
    font-size: 12px;
    color: var(--text-muted);

    margin-bottom: 20px;
}

.left-steam-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    height: 40px;
    padding: 0 18px;

    background: linear-gradient(
        135deg,
        #ff9f0a,
        #ffb020
    );

    border: none;
    border-radius: 8px;

    color: #111;
    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    cursor: pointer;

    box-shadow:
        0 4px 14px rgba(255, 159, 10, 0.18);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        filter 0.15s ease;
}

.left-steam-login-btn i {
    color: #111;
    font-size: 16px;
}

.left-steam-login-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 6px 18px rgba(255, 159, 10, 0.28);

    filter: brightness(1.05);

    color: #111;
}

.left-steam-login-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


/* Disabled Inventory / Shop tabs */

.tab-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
}

/* =========================================
   UPGRADE IN PROGRESS — LOCKED CONTROLS
   ========================================= */

body.upgrade-in-progress #leftGrid,
body.upgrade-in-progress #rightGrid {
    position: relative;
    pointer-events: none;
}

body.upgrade-in-progress .item-card-mini {
    cursor: not-allowed;
    filter: brightness(0.55);
}

body.upgrade-in-progress .item-card-mini::after {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(8, 10, 15, 0.55);
    color: #ffac21;

    font-size: 25px;
    border-radius: 8px;
    z-index: 10;
}

body.upgrade-in-progress .item-card-mini:hover {
    transform: none;
}

body.upgrade-in-progress .inventory-shop-section
button:disabled,
body.upgrade-in-progress .mult-btn:disabled,
body.upgrade-in-progress #upgradeBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

body.upgrade-in-progress #leftGrid::after,
body.upgrade-in-progress #rightGrid::after {
    pointer-events: none;
}

/* =========================================
   PROVABLY FAIR — ROTATE SEED DIALOG
   ========================================= */

.pf-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
}

.pf-dialog-overlay.open {
    display: flex;
}

.pf-dialog {
    width: 100%;
    max-width: 750px;
    padding: 16px 12px 18px;
    border: 1px solid #30323b;
    border-radius: 13px;
    background: #17181d;
    color: #f4f4f5;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

.pf-dialog h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.pf-dialog h3 i {
    color: #ffa329;
    font-size: 16px;
}

.pf-dialog p {
    margin: 0 0 12px;
    color: #a1a1aa;
    font-size: 14px;
    line-height: 1.5;
}

.pf-dialog-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 14px;
    border-radius: 8px;
    background: #202127;
}

.pf-dialog-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.pf-dialog-info-row i {
    flex-shrink: 0;
    margin-top: 3px;
    color: #20d9a0;
}

.pf-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.pf-dialog-actions button {
    min-height: 36px;
    padding: 9px 16px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.pf-dialog-actions button:hover {
    filter: brightness(1.15);
}

#pfDialogCancel {
    background: #30323b;
}

#pfDialogConfirm {
    background: #ffa329;
    color: #17181d;
}

@media (max-width: 600px) {
    .pf-dialog {
        padding: 18px;
    }

    .pf-dialog-actions {
        flex-wrap: wrap;
    }
}
/* Shared stacked-coins currency icon */
.currency-icon { color:#f5a623; font-size:.88em; margin-left:.18em; vertical-align:baseline; display:inline-block; }

/* UPGRADER V2 — fixed Live Upgrades rail and footer alignment.
   Desktop only: on narrow screens preserve the existing responsive layout. */
@media (min-width: 1500px) {
  #liveWinsSidebar.live-wins-sidebar {
    position: fixed !important;
    top: 72px !important;
    left: 8px !important;
    width: 190px !important;
    height: calc(100dvh - 80px) !important;
    max-height: calc(100dvh - 80px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 4px 0 0 !important;
    z-index: 50;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  #liveWinsSidebar .live-wins-title {
    flex: 0 0 auto;
  }
  #liveWinsSidebar .live-wins-content {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #a36c28 transparent;
    overscroll-behavior: contain;
    padding-bottom: 14px;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 94%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 94%, transparent 100%);
  }
  body:has(#liveWinsSidebar) #siteFooter.site-footer {
    margin-left: 208px !important;
    margin-right: 16px !important;
    width: calc(100% - 224px) !important;
    box-sizing: border-box;
  }
}

/* UPGRADER V2 — pinned navigation and seamless fixed live rail */
:root { --upgrader-header-height: 64px; }
html { scroll-padding-top: var(--upgrader-header-height); }
body { padding-top: var(--upgrader-header-height); }
header.navbar {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  width: 100% !important;
  height: var(--upgrader-header-height) !important;
  box-sizing: border-box !important;
  z-index: 1100 !important;
}
@media (min-width: 1500px) {
  #liveWinsSidebar.live-wins-sidebar {
    position: fixed !important;
    top: var(--upgrader-header-height) !important;
    bottom: 0 !important;
    height: calc(100dvh - var(--upgrader-header-height)) !important;
    max-height: none !important;
    z-index: 1000 !important;
  }
  #liveWinsSidebar .live-wins-content {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  #liveWinsSidebar .live-wins-content::-webkit-scrollbar,
  #liveWinsSidebar::-webkit-scrollbar { display: none !important; width: 0 !important; }
}

@media (min-width: 1500px) {
    #liveWinsSidebar.live-wins-sidebar {
        top: 72px !important;
        height: calc(100dvh - 80px) !important;
        max-height: calc(100dvh - 80px) !important;
    }
}
/* Multi-skin Upgrader: preserves the existing stage box dimensions and styling. */
.inventory-selected-bar {
    height: 42px; min-height: 42px; display: flex; align-items: center;
    justify-content: flex-end; gap: 0; padding: 7px 10px 0;
    border-top: 1px solid var(--border-color); color: var(--text-muted);
    font-size: 11px;
}
.inventory-selected-bar strong {
    color: #f5b94f;
    margin-left: 3px;
}
#sourcePreview.multi-skin-preview { min-height: 0; gap: 2px; }
#sourcePreview .selected-skin-mosaic {
    width: min(100%, 265px); height: 148px; flex: 0 1 148px;
    display: flex; flex-wrap: wrap; align-content: center;
    justify-content: center; gap: 3px 7px;
}
#sourcePreview .selected-skin-tile {
    flex: 0 0 calc((100% - 7px) / 2); height: 68px;
    display: flex; align-items: center; justify-content: center;
    min-width: 0; overflow: hidden;
}
#sourcePreview .mosaic-5 .selected-skin-tile { flex-basis: calc((100% - 14px) / 3); }
#sourcePreview .mosaic-3 .selected-skin-tile { flex-basis: calc((100% - 7px) / 2); }
#sourcePreview .selected-skin-tile img,
.stage-box #sourcePreview .selected-skin-tile img {
    width: 100%; height: 100%; max-width: 100%; max-height: 68px!important;
    object-fit: contain; margin: 0;
    filter: drop-shadow(0 3px 6px #0009);
}
#sourcePreview.multi-skin-preview .item-title { margin-top: 1px; font-size: 11px; }
#sourcePreview.multi-skin-preview .item-price { margin-top: 0; font-size: 11px; }

/* 2-5 upgrade inputs inside the original history card image box. */
.history-image-box .history-input-mosaic {
    width: 100%; height: 100%; padding: 4px;
    display: flex; flex-wrap: wrap; align-content: center;
    justify-content: center; gap: 2px 3px;
}
.history-image-box .history-input-tile {
    flex: 0 0 calc((100% - 3px) / 2); height: 57px;
    display: flex; justify-content: center; align-items: center;
    min-width: 0; overflow: hidden;
}
.history-image-box .history-input-mosaic-5 .history-input-tile {
    flex-basis: calc((100% - 6px) / 3);
}
.history-image-box .history-input-tile img {
    width: 100%; height: 100%; max-height: 55px;
    object-fit: contain; margin: 0;
}
.history-image-box .history-input-tile .history-placeholder { font-size: 19px; }
