/* ═══════════════════════════════════════════
   GLHF CS2 Inventory - Dark Theme
   ═══════════════════════════════════════════ */

/* Enerhodar підключається в темі (main.css) з ascent-override; дубль @font-face тут
   перезаписував метрики й зсував цифри FC/смарагдів у хедері на /prizefund/. */

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #111822;
    --bg-card: #151c28;
    --bg-card-hover: #1a2332;
    --bg-toolbar: #0d1219;
    --border: #1e2a3a;
    --border-light: #2a3a50;
    --text-primary: #e8edf3;
    --text-secondary: #8899aa;
    --text-muted: #5a6a7a;
    --accent: #5b9cf5;
    --accent-hover: #7ab4ff;
    --steam-blue: #1b2838;
    --steam-blue-hover: #2a475e;
    --green: #4caf50;
    --red: #f44336;
    --orange: #ff9800;
    --gold: #ffd700;

    /* Rarity colors */
    --rarity-consumer: #b0c3d9;
    --rarity-industrial: #5e98d9;
    --rarity-milspec: #4b69ff;
    --rarity-restricted: #8847ff;
    --rarity-classified: #d32ce6;
    --rarity-covert: #eb4b4b;
    --rarity-extraordinary: #e4ae39;
    --rarity-contraband: #e4ae39;

    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
}

/* Сторінка призового фонду: відступ під хедер при адмін-барі */
.admin-bar .page-content.prizefund-page {
    padding-top: calc(var(--glhf-header-height));
}

.glhf-prizefund-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.glhf-prizefund-wrap *::-webkit-scrollbar { width: 8px; height: 8px; }
.glhf-prizefund-wrap *::-webkit-scrollbar-track { background: var(--bg-primary); }
.glhf-prizefund-wrap *::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
.glhf-prizefund-wrap *::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.glhf-prizefund-wrap * { scrollbar-width: thin; scrollbar-color: var(--border-light) var(--bg-primary); box-sizing: border-box; }

.glhf-prizefund-wrap a { color: var(--accent); text-decoration: none; }
.glhf-prizefund-wrap a:hover { color: var(--accent-hover); }

/* Header removed - handled by WP theme */

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-steam {
    background: #171a21;
    color: #c7d5e0;
    border: 1px solid #2a475e;
}
.btn-steam:hover {
    background: var(--steam-blue-hover);
    color: #fff;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    display: inline-flex;
    align-items: center;
}
.btn-primary:hover {
    background: #7ab4ff;
    border-color: #7ab4ff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-refresh {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.btn-refresh:hover { background: var(--accent-hover); }
.btn-refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-refresh.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ── Stats Bar ── */
.stats-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.stats-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value-sm {
    font-size: 14px;
    font-weight: 500;
}

/* Права частина stats-bar: посилання «Усі предмети» + кнопки для модераторів */
.stats-bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pf-list-back {
    text-decoration: none;
}

/* ── Donate Skins Button ── */
.glhf-prizefund-wrap a.btn-donate-skins,
.glhf-prizefund-wrap a.btn-donate-skins:hover {
    text-decoration: none;
}

a.btn-donate-skins {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-family: 'Enerhodar', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #00ff64;
    text-decoration: none;
    background: rgba(0, 255, 100, 0.07);
    border: 1px solid rgba(0, 255, 100, 0.2);
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.4s ease,
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 0 rgba(0, 255, 100, 0);
    white-space: nowrap;
    z-index: 0;
}

a.btn-donate-skins::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 100, 0.1),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

a.btn-donate-skins:hover {
    color: #fff;
    background: rgba(0, 255, 100, 0.15);
    border-color: rgba(0, 255, 100, 0.45);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.12),
                0 0 40px rgba(0, 255, 100, 0.05);
    transform: translateY(-1px);
}

a.btn-donate-skins:hover::after {
    left: 120%;
}

a.btn-donate-skins:active {
    transform: translateY(0);
    background: rgba(0, 255, 100, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 100, 0.1);
}

.btn-donate-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

a.btn-donate-skins:hover .btn-donate-icon {
    transform: scale(1.12);
}

@media (max-width: 600px) {
    a.btn-donate-skins {
        padding: 7px 14px;
        font-size: 12px;
        gap: 6px;
    }
    .btn-donate-icon {
        width: 15px;
        height: 15px;
    }
}

/* Назва та опис списку зліва в stats-bar (режим перегляду списку) */
.pf-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 24px;
    margin-right: 16px;
    border-right: 1px solid var(--border);
    min-width: 0;
    max-width: 280px;
}

.pf-list-title {
    font-family: 'Enerhodar', var(--glhf-font-heading, 'Inter'), sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.pf-list-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
    display: block;
}

/* ── Toolbar ── */
.toolbar {
    background: var(--bg-toolbar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(var(--glhf-header-height, 80px) - 1px);
    z-index: 90;
}

.admin-bar .toolbar {
    top: calc(var(--glhf-header-height, 80px) + 32px - 1px);
}

@media (max-width: 780px) {
    .stats-bar-inner {
        justify-content: center;
    }

    .stat-item {
        align-items: center;
        text-align: center;
    }

    .stats-bar-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .admin-bar .toolbar {
        top: calc(var(--glhf-header-height, 80px) + 46px - 1px);
        transition: top 0.2s ease;
    }

    .admin-bar.admin-bar-scrolled .toolbar {
        top: calc(var(--glhf-header-height, 80px) - 1px);
    }
}

.toolbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    transition: border-color var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    padding: 8px 28px 8px 10px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6a7a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.filter-select:focus {
    border-color: var(--accent);
}

/* ── Main Grid ── */
.main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ── Item Card ── */
.item-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
    cursor: default;
    position: relative;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.item-card-top {
    position: relative;
    padding: 16px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.item-card-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rarity-color, var(--border));
    opacity: 0.8;
}

.item-img {
    width: 160px;
    height: 120px;
    object-fit: contain;
    transition: transform var(--transition);
    image-rendering: -webkit-optimize-contrast;
}

.item-card:hover .item-img {
    transform: scale(1.05);
}

.item-card-body {
    padding: 8px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.item-exterior {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
}

.item-quality {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--orange);
    background: rgba(255, 152, 0, 0.1);
}

.item-type {
    font-size: 11px;
    color: var(--text-muted);
}

.item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
}

.item-price.no-price {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.item-trade-ban {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(244, 67, 54, 0.12);
    color: var(--red);
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-trade-ban-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

/* Sticker indicators */
.item-stickers {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    /* background: rgba(0, 0, 0, 0.6); */
    backdrop-filter: blur(4px);
    border-radius: 4px;
    z-index: 5;
}

.sticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.8;
    box-shadow: 0 0 4px rgba(91, 156, 245, 0.4);
}

/* Item Actions (кнопки справа) */
.item-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 2;
    opacity: 0;
    transform: translateX(4px);
    transition: all var(--transition);
}

.item-card:hover .item-actions {
    opacity: 1;
    transform: translateX(0);
}

.item-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0.1rem;
    border-radius: var(--radius);
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.item-action-btn:hover {
    background: rgba(91, 156, 245, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.08);
}

.item-action-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.item-action-btn svg path {
    fill: none;
    stroke: currentColor;
}

/* ── Loading ── */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Footer removed - handled by WP theme */

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 99999;
    max-width: 400px;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.toast-success { border-color: var(--green); }
.toast.toast-error { border-color: var(--red); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 12px;
    }

    .toolbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .filters {
        flex-wrap: wrap;
    }

    .filter-select {
        flex: 1;
        min-width: 140px;
    }

    .stats-bar-inner {
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .header-inner {
        padding: 0 16px;
    }

    .stats-bar-inner {
        padding: 12px 16px;
        gap: 16px;
    }

    .stat-action {
        margin-left: 0;
        width: 100%;
    }

    .btn-refresh {
        width: 100%;
        justify-content: center;
    }

    .toolbar-inner {
        padding: 10px 16px;
    }

    .main {
        padding: 16px;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .item-card-top {
        min-height: 110px;
        padding: 12px 12px 6px;
    }

    .item-img {
        width: 120px;
        height: 90px;
    }

    .item-card-body {
        padding: 6px 10px 10px;
    }

    .item-name {
        font-size: 12px;
    }

    .user-name {
        display: none;
    }

    .footer-inner {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
}

/* ── Fade-in animation ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-card {
    animation: fadeIn 0.3s ease forwards;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-bar .modal-overlay {
    top: 32px;
}

/* Management modals - right sidebar */
#modal-prize-lists,
#modal-list-detail {
    justify-content: flex-end;
    align-items: stretch;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: none;
    animation: overlayFadeIn 0.7s ease forwards;
}
#modal-prize-lists.closing,
#modal-list-detail.closing {
    animation: overlayFadeOut 0.3s ease forwards;
}
#modal-prize-lists .modal,
#modal-list-detail .modal {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    animation: slideInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
}
#modal-prize-lists.closing .modal,
#modal-list-detail.closing .modal {
    animation: slideOutRight 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
#modal-prize-lists .modal-body,
#modal-list-detail .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40%); }
}
@keyframes overlayFadeIn {
    from { background: rgba(0, 0, 0, 0); }
    to   { background: rgba(0, 0, 0, 0.4); }
}
@keyframes overlayFadeOut {
    from { background: rgba(0, 0, 0, 0.4); }
    to   { background: rgba(0, 0, 0, 0); }
}

/* Item details - centered, top layer */
#modal-item-details {
    z-index: 9000;
    padding: 20px;
    perspective: 1200px;
    animation: detailOverlayIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
#modal-item-details .modal-item {
    animation: itemDetailIn 0.55s cubic-bezier(0.2, 0, 0, 1);
}
#modal-item-details.closing {
    animation: detailOverlayOut 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}
#modal-item-details.closing .modal-item {
    animation: itemDetailOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes detailOverlayIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to   { opacity: 1; backdrop-filter: blur(6px); }
}
@keyframes detailOverlayOut {
    from { opacity: 1; backdrop-filter: blur(6px); }
    to   { opacity: 0; backdrop-filter: blur(0); }
}
@keyframes itemDetailIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes itemDetailOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.96) translateY(8px); }
}

/* Centered modals (create/edit list, winner edit) */
#modal-create-list,
#modal-winner-edit {
    animation: overlayDimIn 0.5s ease;
}
#modal-create-list .modal,
#modal-winner-edit .modal {
    animation: centeredModalIn 0.55s cubic-bezier(0.2, 0, 0, 1);
}
#modal-create-list.closing,
#modal-winner-edit.closing {
    animation: overlayDimOut 0.35s ease forwards;
}
#modal-create-list.closing .modal,
#modal-winner-edit.closing .modal {
    animation: centeredModalOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes centeredModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes centeredModalOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.96) translateY(8px); }
}
@keyframes overlayDimIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes overlayDimOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.2s ease;
}

.modal-wide { max-width: 720px; }

#modal-prize-lists .modal.modal-wide {
    max-width: 780px;
}

#modal-list-detail .modal.modal-wide {
    max-width: 800px;
}

.modal-item { 
    max-width: 900px; 
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-back {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition);
    flex-shrink: 0;
}
.modal-back:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.modal-body {
    padding: 20px;
}

/* Item Details Modal */
.modal-item .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 20, 0.8);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.modal-item-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
}

.modal-item-columns {
    display: flex;
    gap: 24px;
}

.modal-item-left {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.modal-item-image-container {
    width: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-item-image {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

.modal-item-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-item-name {
    font-family: 'Enerhodar', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-item-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.modal-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.modal-info-row:last-child,
.modal-info-row[style*="display: none"] + .modal-info-row,
.modal-info-row[style*="display:none"] + .modal-info-row {
    border-top: none;
}

/* Приховані рядки не створюють подвійних borders */
.modal-info-row[style*="display: none"],
.modal-info-row[style*="display:none"] {
    border: none;
    padding: 0;
    margin: 0;
}

.modal-info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 140px;
    flex-shrink: 0;
}

.modal-info-value {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
}

.modal-info-value.modal-price {
    font-size: 18px;
    font-weight: 700;
}

/* Float bar in modal */
.modal-float-block {
    flex-direction: column !important;
    align-items: stretch !important;
}

.modal-float-full {
    width: 100%;
}

.modal-float-header {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.modal-float-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-float-pair .modal-info-label {
    min-width: 40px;
}

.modal-float-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.float-bar {
    width: 100%;
    height: 10px;
    background: linear-gradient(to right,
        #5eb648 0%, #5eb648 7%,
        #79d154 7%, #79d154 15%,
        #e3e15b 15%, #e3e15b 38%,
        #e9a75d 38%, #e9a75d 45%,
        #e05a59 45%, #e05a59 100%
    );
    border-radius: 10px;
    position: relative;
}

.float-bar-dead {
    position: absolute;
    top: 0;
    height: 100%;
    background: #2a2a2a;
    z-index: 1;
    display: none;
}

.float-bar-dead-left {
    left: -2px;
    border-radius: 10px 0 0 10px;
    padding-left: 2px;
}

.float-bar-dead-right {
    right: -2px;
    border-radius: 0 10px 10px 0;
    padding-right: 2px;
}

.float-indicator {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 16px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,0.6);
    transition: left 0.3s ease;
    z-index: 2;
}

.float-bar-labels {
    display: flex;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.float-bar-labels span {
    text-align: center;
}


.modal-stickers-section {
    margin-top: -18px;
    padding: 12px;
    border-radius: var(--radius);
}

.modal-stickers-label {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-stickers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-sticker-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(91, 156, 245, 0.12);
    color: var(--accent);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(91, 156, 245, 0.2);
    line-height: 1;
}

/* Під час скріншота span без власного фону/рамки — видно лише зображення */
.modal-sticker-tag.modal-sticker-tag-screenshot {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}
.modal-sticker-tag.modal-sticker-tag-screenshot img {
    display: block;
    vertical-align: middle;
}

.modal-item-actions-bottom {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.modal-item-actions-bottom .btn {
    flex: 1;
    justify-content: center;
    text-align: center;
}

.modal-item-actions-bottom a#modal-item-ingame-btn {
    color: #fff;
}

.modal-item-actions-bottom a#modal-item-ingame-btn:hover {
    color: #fff !important;
}

/* StatTrak™ quality styling */
.modal-info-value .quality-stattrak {
    color: #cf6a32;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(207, 106, 50, 0.3);
}

.modal-info-value .quality-souvenir {
    color: #ffd700;
    font-weight: 700;
}

/* Responsive - Item Details Modal (mobile only) */
@media (max-width: 768px) {
    .modal-item-columns {
        flex-direction: column;
    }

    .modal-item-left {
        flex: 0 0 auto;
        width: 100%;
        position: relative;
    }

    .modal-item-name {
        font-size: 15px;
        line-height: 1.2;
        padding-bottom: 10px;
        padding-right: 40px;
    }

    .modal-item-content {
        padding: 16px;
        gap: 12px;
    }

    .modal-item .modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .modal-stickers-section {
        position: absolute;
        bottom: 8px;
        left: 8px;
        margin-top: 0;
        padding: 0;
        z-index: 2;
        pointer-events: none;
    }

    .modal-stickers-list {
        justify-content: flex-start;
        gap: 4px;
        pointer-events: auto;
    }

    .modal-sticker-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        padding: 3px 7px;
        background: rgba(10, 14, 20, 0.8);
        backdrop-filter: blur(4px);
        color: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1;
    }

    .modal-info-label {
        min-width: 100px;
        font-size: 12px;
    }

    .modal-info-value {
        font-size: 13px;
    }

    .modal-item-actions-bottom {
        flex-direction: column;
    }

    #modal-item-details {
        padding: 10px;
    }

    #modal-item-details .modal-item {
        max-height: 95vh;
        overflow-y: auto;
    }
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.setting-textarea {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    resize: vertical;
    outline: none;
}
.setting-textarea:focus { border-color: var(--accent); }

.token-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-value {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    color: var(--accent);
    word-break: break-all;
    flex: 1;
}

/* ── Sync Steps ── */
.sync-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.sync-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.sync-step a {
    color: var(--accent);
    text-decoration: underline;
}

.step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.snippet-container {
    position: relative;
}

.snippet {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
}

.snippet-copy {
    position: absolute;
    top: 8px;
    right: 8px;
}

.sync-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
}
.sync-status.success { background: rgba(76,175,80,0.1); color: var(--green); border: 1px solid rgba(76,175,80,0.3); }
.sync-status.error { background: rgba(244,67,54,0.1); color: var(--red); border: 1px solid rgba(244,67,54,0.3); }

/* ═══════════════════════════════════════════
   Image Source Toggle & Fullscreen Viewer
   ═══════════════════════════════════════════ */

.modal-item-image-container {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    transition: background 0.3s ease;
}

.modal-item-image-container:hover .image-fullscreen-btn,
.modal-item-image-container:hover .image-source-toggle {
    opacity: 1;
}

.image-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 5;
}

.image-fullscreen-btn .image-fullscreen-btn-icon {
    display: block;
    flex-shrink: 0;
    stroke: currentColor;
}

.image-fullscreen-btn:hover {
    background: rgba(91, 156, 245, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.image-source-toggle {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 3px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 5;
}

.img-src-btn {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.img-src-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.img-src-btn.active {
    color: #fff;
    background: var(--accent);
}

.img-src-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* CSFloat screenshot badge */
.csfloat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(91, 156, 245, 0.15);
    color: var(--accent);
    border: 1px solid rgba(91, 156, 245, 0.25);
    border-radius: var(--radius-sm);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-item-image-container:hover .csfloat-badge {
    opacity: 1;
}

/* ── Fullscreen Viewer ── */
.fullscreen-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.fullscreen-viewer.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.fullscreen-viewer.dragging {
    cursor: grabbing;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.fullscreen-close:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: var(--red);
    color: var(--red);
}

.fullscreen-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    padding: 60px 40px 80px;
}

.fullscreen-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.15s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.fullscreen-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    z-index: 10;
}

.fullscreen-source-toggle {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 3px;
}

.fullscreen-zoom {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fullscreen-zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.fullscreen-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.fullscreen-zoom-level {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 44px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.fullscreen-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Image loading shimmer */
.modal-item-image.loading-shimmer {
    min-height: 200px;
    background: linear-gradient(
        -45deg,
        rgba(255,255,255,0.02) 25%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.02) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive for fullscreen */
@media (max-width: 768px) {
    .fullscreen-controls {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px 16px;
    }

    .fullscreen-item-name {
        display: none;
    }

    .fullscreen-image-wrapper {
        padding: 60px 16px 120px;
    }

    .image-source-toggle {
        opacity: 1;
    }

    .image-fullscreen-btn {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════
   Prize Lists UI
   ═══════════════════════════════════════════ */

.prize-lists-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.prize-lists-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.prize-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.prize-list-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.prize-list-info {
    flex: 1;
    min-width: 0;
}

.prize-list-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prize-list-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.prize-list-stats {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.prize-list-stat {
    text-align: center;
    width: 72px;
}

.prize-list-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.prize-list-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prize-list-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.prize-list-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.prize-list-action-btn svg {
    flex-shrink: 0;
    display: block;
}
.prize-list-action-btn .prize-list-action-icon {
    flex-shrink: 0;
    color: inherit;
}

.prize-list-action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.prize-list-action-btn.edit:hover {
    background: rgba(91,156,245,0.12);
    color: var(--accent);
    border-color: var(--accent);
}

.prize-list-action-btn.archive:hover {
    background: rgba(255,152,0,0.12);
    color: #ff9800;
    border-color: #ff9800;
}

.prize-list-action-btn.danger:hover {
    background: rgba(244,67,54,0.12);
    color: var(--red);
    border-color: var(--red);
}

/* Кнопка «вже в списку» - мінус замість плюса */
.item-action-btn.btn-in-list {
    cursor: pointer;
    color: var(--red);
    border-color: rgba(244, 67, 54, 0.35);
    background: rgba(244, 67, 54, 0.08);
}
.item-action-btn.btn-in-list:hover {
    color: var(--red);
    background: rgba(244, 67, 54, 0.18);
    border-color: var(--red);
}

/* List Detail Items */
.list-detail-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.list-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.list-detail-item-img {
    width: 64px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.list-detail-item-info {
    flex: 1;
    min-width: 0;
}

.list-detail-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-detail-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.list-detail-item-tradeban {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #ff4545;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 5px;
    background: #ff454530;
}

.list-detail-item-tradeban-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.list-item-tradeban {
    color: var(--orange);
    font-weight: 600;
}

.list-detail-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--green);
    flex-shrink: 0;
}

.list-detail-item-winner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.winner-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.winner-badge.pending { background: rgba(255,152,0,0.12); color: var(--orange); }
.winner-badge.sent { background: rgba(91,156,245,0.12); color: var(--accent); }
.winner-badge.confirmed { background: rgba(76,175,80,0.12); color: var(--green); }
.winner-badge.failed { background: rgba(244,67,54,0.12); color: var(--red); }
.winner-badge.has-url { background: rgba(156,136,255,0.12); color: #b8a9ff; }

/* Add to list popup */
.add-to-list-popup {
    position: fixed;
    z-index: 300;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
}

.add-to-list-popup-content .atl-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
}

.add-to-list-popup-content .atl-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.add-to-list-popup-content .atl-option.in-list {
    color: var(--green);
    font-weight: 600;
}

/* Setting input (reused) */
.setting-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    padding: 8px 12px;
    outline: none;
}

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

.winner-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.winner-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.winner-search-item:hover { background: rgba(255,255,255,0.06); }
.winner-search-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-dark);
}
.winner-search-avatar--default {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.winner-search-info { flex: 1; min-width: 0; }
.winner-search-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.winner-search-username {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}
.winner-search-trade {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.winner-search-trade.has { background: rgba(76,175,80,0.12); color: var(--green); }
.winner-search-trade.no { background: rgba(255,152,0,0.12); color: var(--orange); }
.winner-search-hint {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.winner-search-loading {
    padding: 16px;
    text-align: center;
}
.winner-search-loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Winner selected badge */
.winner-selected-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.winner-badge-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-dark);
}
.winner-badge-avatar--default {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.winner-badge-info {
    flex: 1;
    min-width: 0;
}
.winner-badge-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}
.winner-badge-name:hover {
    opacity: 0.8;
    text-decoration: underline;
}
.winner-badge-username {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}
.winner-badge-clear {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.winner-badge-clear:hover {
    background: rgba(244,67,54,0.15);
    color: #ef5350;
    border-color: rgba(244,67,54,0.3);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ═══ Prize Lists Tabs ═══ */
.prize-lists-tabs {
    display: flex;
    gap: 4px;
}
.prize-lists-tab {
    padding: 6px 16px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.prize-lists-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.prize-lists-tab:hover:not(.active) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
.prize-lists-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* ═══ Prize List Date & Type Badge ═══ */
.prize-list-date {
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}
.prize-list-type-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* ═══ Archive Pagination ═══ */
.archive-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 16px 0 4px;
}
.archive-page-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.archive-page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.archive-page-btn:hover:not(.active) {
    background: var(--bg-card-hover);
}

/* ═══ Category Headers (list detail modal) ═══ */
.list-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 6px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-light);
}
.list-cat-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    outline: none;
    min-width: 60px;
}
.list-cat-name:focus {
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--accent);
}
.list-cat-name-static {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}
.list-cat-delete {
    font-size: 14px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    margin-left: auto;
}
.list-cat-delete:hover {
    background: rgba(244,67,54,0.15);
    color: var(--red);
}

/* ═══ Tournament Switcher ═══ */
.tournament-winners-select {
    font-size: 12px;
    font-family: inherit;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}
.tournament-winners-select:focus { border-color: var(--accent); }

/* ═══ Move Category Select ═══ */
.move-cat-select {
    font-size: 11px;
    font-family: inherit;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    max-width: 100px;
    outline: none;
}
.move-cat-select:focus { border-color: var(--accent); }

/* ═══ Quality Badges ═══ */
.quality-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}
.quality-stattrak, .quality-badge.quality-stattrak {
    background: rgba(207,106,50,0.2);
    color: #cf6a32;
    padding: 2px 6px;
    border-radius: 4px;
}
.quality-souvenir, .quality-badge.quality-souvenir {
    background: rgba(255,215,0,0.2);
    color: var(--gold);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ═══ Empty Slot (Recommendation) ═══ */
.slot-empty {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(91,156,245,0.04);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 4px;
}
.slot-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}
.slot-target-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}
.slot-actions {
    display: flex;
    gap: 4px;
}
.slot-actions .btn-sm {
    padding: 3px 10px;
    font-size: 13px;
}
.slot-rec-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
}
.slot-rec-img {
    width: 48px;
    height: 36px;
    object-fit: contain;
    opacity: 0.5;
    border-radius: 4px;
}
.slot-rec-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slot-rec-price {
    color: var(--green);
    font-weight: 600;
    flex-shrink: 0;
}

/* ═══ Clickable items in list detail ═══ */
.list-detail-item-clickable {
    cursor: pointer;
    transition: opacity var(--transition);
}
.list-detail-item-clickable:hover {
    opacity: 0.8;
}

/* ═══ Category Layout (Public List) ═══ */
.items-grid.category-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.category-group {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.category-items .item-card {
    width: 200px;
    flex-shrink: 0;
}

.category-separator {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0 4px;
}
.category-separator::before,
.category-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}
.category-separator span {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* ═══ btn ghost / primary small ═══ */
.btn { cursor: pointer; font-family: inherit; }
.btn-sm { font-size: 12px; padding: 4px 12px; }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-primary {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); }
