:root {
    --primary-color: #3a3a3a;
    --secondary-color: #666666;
    --accent-color: #4a4a4a;
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --success-color: #888888;
    --danger-color: #f44336;
    --glow-color: rgba(74, 74, 74, 0.3);
    --dark-bg: #000000;
    --darker-bg: #0f0f0f;
    --text-dim: #cccccc;
    --hover-bg: #2a2a2a;
}

@font-face {
    font-family: 'Fony';
    src: url('font/fony.OTF') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fony', 'Outfit', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    animation: fadeIn 0.5s ease;
    touch-action: manipulation;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 18px rgba(255,255,255,0.08);
}

.burger-btn {
    width: 42px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.burger-btn span {
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 3px;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
    z-index: 9000;
}

.drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 33vw);
    background: rgba(18, 18, 18, 0.92);
    border-left: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
    transform: translateX(110%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9001;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

@media (max-width: 720px) {
    .app-drawer {
        width: min(380px, 82vw);
    }
}

.app-drawer.is-open {
    transform: translateX(0);
}

.drawer-header {
    display: grid;
    grid-template-columns: 52px 1fr 34px;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.drawer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
}

.drawer-name {
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    font-weight: 600;
}

.drawer-balance {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.70);
}

.drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    font-size: 20px;
    cursor: pointer;
}

.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
}

.drawer-btn {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    text-align: left;
}

.case-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.case-modal {
    width: min(560px, 92vw);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(20, 20, 24, 0.92);
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    transform: scale(0.96);
    opacity: 0;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.case-overlay.is-open .case-modal {
    transform: scale(1);
    opacity: 1;
}

 .modal-overlay {
     position: fixed;
     inset: 0;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 16px;
     background: rgba(0,0,0,0.72);
     backdrop-filter: blur(10px);
     z-index: 10030;
 }

 .modal-card {
     width: min(520px, 92vw);
     border-radius: 18px;
     padding: 16px;
     border: 1px solid rgba(255,255,255,0.12);
     background: rgba(20, 20, 24, 0.92);
     box-shadow: 0 24px 80px rgba(0,0,0,0.55);
 }

 .modal-title {
     font-size: 18px;
     font-weight: 800;
     letter-spacing: 0.01em;
 }

 .modal-label {
     margin-top: 12px;
     font-size: 12px;
     color: rgba(255,255,255,0.7);
 }

 .modal-input {
     margin-top: 8px;
     width: 100%;
     padding: 12px 12px;
     border-radius: 12px;
     border: 1px solid rgba(255,255,255,0.12);
     background: rgba(255,255,255,0.06);
     color: rgba(255,255,255,0.92);
     outline: none;
 }

 .modal-error {
     min-height: 18px;
     margin-top: 10px;
     font-size: 12px;
     color: rgba(244, 67, 54, 0.95);
 }

 .modal-actions {
     margin-top: 8px;
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 10px;
 }

 .modal-btn {
     padding: 12px 12px;
     border-radius: 14px;
     border: 1px solid rgba(255,255,255,0.12);
     background: rgba(255,255,255,0.06);
     color: rgba(255,255,255,0.92);
     cursor: pointer;
 }

 .modal-btn.primary {
     border: none;
     background: rgba(255,255,255,0.14);
     color: rgba(255,255,255,0.95);
 }

 .modal-btn.secondary {
     background: rgba(255,255,255,0.06);
 }

.case-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.case-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.case-reel {
    position: relative;
    margin-top: 14px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
}

.case-reel-window {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(108,92,231,0), rgba(108,92,231,0.9), rgba(108,92,231,0));
    box-shadow: 0 0 18px rgba(108,92,231,0.55);
    z-index: 2;
    pointer-events: none;
}

.case-reel-track {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    transform: translateX(0);
}

.case-item {
    width: 92px;
    height: 96px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.35);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    position: relative;
}

.case-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
    pointer-events: none;
}

.case-item .case-price {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    font-size: 11px;
    text-align: center;
    color: rgba(255,255,255,0.86);
    pointer-events: none;
}

.case-claim {
    margin-top: 14px;
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.topup-page {
    padding: 20px 0;
}

.page {
    display: none;
    position: relative;
}

.page.is-active {
    display: block;
}

.topup-card {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

.topup-head {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    margin-bottom: 12px;
}

.topup-back {
    width: 42px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
}

.topup-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.topup-balance {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    padding: 8px 0 14px;
}

.topup-row {
    display: grid;
    gap: 8px;
}

.topup-label {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

.topup-input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    outline: none;
}

.topup-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0;
}

.topup-preset {
    padding: 10px 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    cursor: pointer;
}

.topup-cta {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.95);
    cursor: pointer;
}

.topup-hint {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

.balance-anim {
    display: inline-block;
    transition: color 220ms ease;
}

.balance-anim.is-up {
    color: rgba(46, 204, 113, 0.95);
}

.balance-anim.is-down {
    color: rgba(231, 76, 60, 0.95);
}

.app-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    z-index: 9999;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.app-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-loading__spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.9);
    animation: appSpin 0.9s linear infinite;
}

.app-loading__text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    letter-spacing: 0.02em;
}

@keyframes appSpin {
    to { transform: rotate(360deg); }
}

* {
    font-family: 'Fony', 'Outfit', sans-serif;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.tab-buttons {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.tab-btn:hover::before {
    opacity: 0.1;
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 4px 15px rgba(74, 74, 74, 0.3);
    transform: translateY(-1px);
}

.tab-btn.active::before {
    opacity: 1;
}

.tab-content {
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glow Effect */
.glow-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.glow-effect.win {
    box-shadow: inset 0 0 100px rgba(76, 175, 80, 0.8),
                inset 0 0 50px rgba(76, 175, 80, 0.6),
                inset 0 0 25px rgba(76, 175, 80, 0.4);
}

.glow-effect.loss {
    box-shadow: inset 0 0 100px rgba(244, 67, 54, 0.8),
                inset 0 0 50px rgba(244, 67, 54, 0.6),
                inset 0 0 25px rgba(244, 67, 54, 0.4);
}

.glow-effect.active {
    opacity: 1;
}
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #0f0f0f, #1a1a1a);
    opacity: 0;
    animation: fadeIn 3s ease-in-out forwards;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(74, 74, 74, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.user-panel {
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.tg-user-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tg-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tg-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.tg-balance {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.logo-img {
    height: 60px; /* Увеличил с 40px до 60px */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7); /* Сделал серым */
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(90deg, #666, #999, #ccc, #999, #666);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(136, 136, 136, 0.3);
}

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

.balance-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-size: 24px;
    font-weight: 600;
    color: var(--success-color);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.top-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Slot Cards */
.slot-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.6s ease;
    width: 100%;
}

/* Your Target всегда квадратный */
#target-slot.slot-card {
    width: 100%;
    height: 300px;
}

/* Your Offer: квадратный на старте/при 0-1 скине, дальше растёт вниз */
#input-slot.slot-card.offer-square {
    width: 100%;
    height: 300px;
}

 #input-slot.offer-square .slot-content {
     height: 100%;
 }

 #input-slot.offer-square .selected-skins-grid {
     height: 100%;
     margin-bottom: 0;
     overflow: hidden;
     align-content: stretch;
     justify-items: stretch;
     grid-template-columns: repeat(2, minmax(0, 1fr));
     grid-auto-rows: 1fr;
 }

 #input-slot.offer-square .selected-skins-grid.count-0 {
     grid-template-columns: 1fr;
 }

 /* 1 skin: one large tile */
 #input-slot.offer-square .selected-skins-grid.count-1 {
     grid-template-columns: 1fr;
 }

 /* 2 skins: left + right */
 #input-slot.offer-square .selected-skins-grid.count-2 {
     grid-template-columns: 1fr 1fr;
 }

 /* 3 skins: 2 on top, 1 centered bottom */
 #input-slot.offer-square .selected-skins-grid.count-3 {
     grid-template-columns: 1fr 1fr;
 }
 #input-slot.offer-square .selected-skins-grid.count-3 .selected-skin-item:nth-child(3) {
     grid-column: 1 / 3;
     justify-self: center;
     width: 60%;
 }

 /* 4 skins: 2x2 */
 #input-slot.offer-square .selected-skins-grid.count-4 {
     grid-template-columns: 1fr 1fr;
 }

 /* 5-6 skins: 3 columns (denser) */
 #input-slot.offer-square .selected-skins-grid.count-5,
 #input-slot.offer-square .selected-skins-grid.count-6 {
     grid-template-columns: repeat(3, minmax(0, 1fr));
 }

 #input-slot.offer-square .selected-skin-item {
     padding: 6px;
     min-width: 0;
     height: 100%;
     box-sizing: border-box;
     overflow: hidden;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
 }

 #input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item {
     padding: 16px;
 }

 #input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item img {
     height: 150px;
 }

 #input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item .name {
     font-size: 14px;
 }

 #input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item .price {
     font-size: 12px;
 }

 #input-slot.offer-square .selected-skins-grid.count-5 .selected-skin-item .name,
 #input-slot.offer-square .selected-skins-grid.count-6 .selected-skin-item .name {
     font-size: 9px;
 }

 #input-slot.offer-square .selected-skins-grid.count-2 .selected-skin-item img {
     height: 48px;
 }

 #input-slot.offer-square .selected-skins-grid.count-2 .selected-skin-item .name {
     font-size: 10px;
 }

 #input-slot.offer-square .selected-skins-grid.count-3 .selected-skin-item img {
     height: 42px;
 }

 #input-slot.offer-square .selected-skins-grid.count-3 .selected-skin-item .name {
     font-size: 9px;
 }

 #input-slot.offer-square .selected-skins-grid.count-4 .selected-skin-item img {
     height: 38px;
 }

 #input-slot.offer-square .selected-skins-grid.count-4 .selected-skin-item .name {
     font-size: 9px;
 }

 #input-slot.offer-square .selected-skin-item img {
     height: 44px;
 }

 #input-slot.offer-square .selected-skin-item .name {
     font-size: 10px;
     line-height: 1.1;
     max-width: 100%;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 #input-slot.offer-square .selected-skin-item .price {
     font-size: 10px;
 }

/* Your Offer: когда скинов 2+, карточка растёт вниз (не фиксируем aspect-ratio) */
#input-slot.slot-card {
    height: auto;
}

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

.slot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(108, 92, 231, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slot-card:hover::before {
    opacity: 1;
}

.slot-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.2);
}

.slot-header {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-family: 'Outfit', sans-serif;
}

.slot-content {
    min-height: 200px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

#input-slot .slot-content,
#target-slot .slot-content {
    gap: 12px;
}

#target-slot .slot-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

#target-slot .slot-content img {
    width: min(220px, 80%);
    height: 140px;
    margin-bottom: 14px;
}

 #target-slot .target-display {
     background: var(--card-bg);
     border: none;
     border-radius: 0;
     padding: 16px;
     width: 100%;
     max-width: 100%;
     margin: 0 auto;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 6px;
     opacity: 1;
     transform: translateY(0);
     transition: opacity 160ms ease, transform 160ms ease;
 }

 #target-slot .target-display.is-fading {
     opacity: 0;
     transform: translateY(6px);
 }

 #target-slot .target-display img {
     width: 100%;
     height: 150px;
     object-fit: contain;
     margin-bottom: 10px;
 }

 #target-slot .target-display .name {
     font-size: 14px;
     color: var(--text-primary);
     margin-bottom: 2px;
     text-align: center;
     width: 100%;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 #target-slot .target-display .price {
     font-size: 11px;
     color: var(--success-color);
     font-weight: 600;
     text-align: center;
 }

#target-slot .slot-info {
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

#input-slot.offer-square .slot-content {
    height: 100%;
}

.slot-content img {
    width: 120px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}

.slot-info .name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.slot-info .price {
    font-size: 16px;
    color: var(--success-color);
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Динамическая сетка для выбранных скинов */
.selected-skins-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.selected-skin-item {
    background: var(--card-bg);
    border: none;
    border-radius: 0;
    padding: 8px;
    display: block;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.3s ease;
    flex-shrink: 0;
    min-width: 120px;
    max-width: 100%;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: scale(0.8);
    }
    to { 
        opacity: 1; 
        transform: scale(1);
    }
}

.selected-skin-item:hover {
    transform: translateY(-2px);
}

.selected-skin-item img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    margin-bottom: 4px;
}

.selected-skin-item .name {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.selected-skin-item .price {
    font-size: 11px;
    color: var(--success-color);
    font-weight: 600;
}

#input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item img {
    height: 150px;
}

#input-slot.offer-square .selected-skins-grid.count-1 .selected-skin-item .name {
    font-size: 14px;
}

.remove-skin {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

 @media (max-width: 720px) {
     .remove-skin {
         width: 22px;
         height: 22px;
         font-size: 14px;
         opacity: 1;
     }
 }

.selected-skin-item:hover .remove-skin {
    opacity: 1;
}

/* Ячейка для добавления нового скина */
.add-skin-slot {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 1;
    width: 100%;
}

/* Убираем кнопку Add из блока выбранных скинов */
#selected-skins-grid .add-skin-slot {
    display: none;
}

.add-skin-slot:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.add-icon {
    font-size: 24px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.add-text {
    font-size: 12px;
    color: var(--text-dim);
}

/* selection-info removed from HTML */
#selection-info,
.selection-info {
    display: none;
}

/* Wheel Panel */
.wheel-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.wheel-panel.wheel-appear {
    animation: wheelAppear 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wheelAppear {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
        box-shadow: 0 0 0 rgba(108, 92, 231, 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 28px rgba(108, 92, 231, 0.18);
    }
}

.info-row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat .label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat .val {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Chance Selector */
.chance-selector {
    margin-bottom: 20px;
}

.chance-label-input {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-dim);
}

.chance-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.chance-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 14px;
    min-width: 60px;
}

/* Для кнопок с очень маленькими процентами делаем шрифт меньше */
.chance-btn[data-chance="0.0001"],
.chance-btn[data-chance="0.001"],
.chance-btn[data-chance="0.01"] {
    font-size: 11px;
    padding: 8px 12px;
}

.chance-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.chance-btn:hover::before {
    left: 100%;
}

.chance-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.2), transparent);
    transition: left 0.5s;
}

.chance-btn:hover::before {
    left: 100%;
}

.chance-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    transform: translateY(-1px);
}

.chance-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    color: white;
}

.lightning-btn {
    position: absolute;
    top: 10px;
    right: -20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto;
}

.lightning-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.lightning-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Wheel Container */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    --pointer-radius: 130px;
}

#upgrade-wheel {
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    transition: transform 0.1s linear;
}

/* Новая стрелка - ещё выше */
.wheel-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px; /* Центрируем по горизонтали */
    margin-top: calc(-1 * var(--pointer-radius));
    transform-origin: center var(--pointer-radius);
    z-index: 15;
    pointer-events: none;
}

.pointer-arrow-img {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1); /* Делаем картинку белой */
    pointer-events: none;
}

.wheel-center-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
pointer-events: none;
}

.chance-display {
font-size: 20px;
font-weight: 600;
color: var(--text-primary);
font-family: 'Outfit', sans-serif;
}

.chance-label {
font-size: 10px;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 1px;
font-family: 'Outfit', sans-serif;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
}

.fast-roll-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.fast-roll-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.fast-roll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.roll-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.roll-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.roll-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.roll-btn:hover:not(:disabled)::before {
    left: 100%;
}

.roll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* List Panels */
.list-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.list-panel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.55));
}

.panel-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--card-bg), var(--hover-bg));
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.market-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.market-header h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

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

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.filter-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.market-filters .filter-group i {
    color: var(--text-dim) !important;
    font-size: 14px !important;
    opacity: 0.6 !important;
    transition: all 0.3s ease !important;
}

.market-filters .filter-group:hover i {
    opacity: 0.8 !important;
    color: var(--text-secondary) !important;
}

.market-filters .filter-group input,
.market-filters .filter-group select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    color: var(--text-primary) !important;
    outline: none !important;
    font-size: 14px !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

.market-filters .filter-group input:focus,
.market-filters .filter-group select:focus {
    border-color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.2) !important;
}

.market-filters .filter-group input::placeholder {
    color: var(--text-dim) !important;
    opacity: 0.6 !important;
}

.market-filters .filter-group select {
    cursor: pointer !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    padding-right: 28px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.market-filters .filter-group span {
    color: var(--text-dim) !important;
    font-size: 14px !important;
    opacity: 0.5 !important;
    user-select: none !important;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

#selected-skins-grid {
    max-height: none;
    overflow-y: visible;
    scrollbar-gutter: stable;
}

.skin-card {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(108, 92, 231, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skin-card:hover::before {
    opacity: 1;
}

.skin-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.skin-card.selected {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(139, 122, 184, 0.3);
    background: linear-gradient(135deg, var(--dark-bg), rgba(139, 122, 184, 0.05));
}

.skin-card img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.skin-name {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skin-price {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 600;
}

/* Pagination */
.pagination-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 12px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Button States */
.btn-win {
    background: linear-gradient(45deg, var(--success-color), var(--accent-color)) !important;
    animation: pulse-win 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(136, 136, 136, 0.6) !important;
}

.btn-loss {
    background: linear-gradient(45deg, var(--danger-color), #ff4757) !important;
    animation: pulse-loss 1s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.8) !important;
}

@keyframes pulse-win {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 20px rgba(139, 122, 184, 0.6);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 30px rgba(139, 122, 184, 0.8);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 20px rgba(139, 122, 184, 0.6);
    }
}

@keyframes pulse-loss {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 40px rgba(255, 107, 107, 1);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    }
}

/* UI Blocking */
.ui-blocked {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Grid Items */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

#inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.grid-item {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#inventory-grid .grid-item {
    aspect-ratio: 1 / 1;
    padding: 6px;
}

#inventory-grid .grid-item img {
    height: 58%;
    max-height: 64px;
    margin-bottom: 4px;
}

#inventory-grid .grid-item .name {
    font-size: 10px;
}

#inventory-grid .grid-item .price {
    font-size: 11px;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(108, 92, 231, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover::before {
    opacity: 1;
}

.grid-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 74, 74, 0.2);
}

.grid-item.active {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(74, 74, 74, 0.3);
    background: linear-gradient(135deg, var(--dark-bg), rgba(74, 74, 74, 0.05));
}

.grid-item.chance-match {
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
    background: linear-gradient(135deg, var(--dark-bg), rgba(52, 152, 219, 0.05));
}

.chance-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #3498db;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.selected-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--success-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.grid-item img {
    width: 100%;
    height: 50px;
    object-fit: contain;
    margin-bottom: 6px;
}

.grid-item .name {
    font-size: 11px;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-item .price {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .top-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .market-filters {
        flex-direction: column;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 15px;
    }
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    header {
        flex-direction: row;
        gap: 12px;
        text-align: left;
        justify-content: space-between;
        align-items: center;
    }
    
    .dashboard {
        gap: 15px;
    }
    
    .top-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "wheel wheel"
            "offer target";
        gap: 12px;
        align-items: start;
    }
    
    .slot-card {
        padding: 15px;
        min-height: 150px;
    }
    
    .wheel-panel {
        grid-area: wheel;
        justify-self: center;
        width: 100%;
        max-width: 420px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

     #input-slot {
         grid-area: offer;
     }

     #target-slot {
         grid-area: target;
     }
    
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    
    #upgrade-wheel {
        width: 250px;
        height: 250px;
    }

     .chance-selector {
         width: 100%;
         display: flex;
         flex-direction: column;
         align-items: center;
     }

     .chance-label-input {
         text-align: center;
     }

     .chance-buttons {
         width: 100%;
         max-width: 420px;
     }

     .controls {
         width: 100%;
         display: flex;
         justify-content: center;
     }

     .roll-btn {
         width: min(320px, 90%);
     }
    
    .chance-buttons {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .chance-btn {
        font-size: 12px;
        padding: 6px 12px;
        min-width: 50px;
    }
    
    .bottom-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 10px;
    }
    
    .grid-item {
        padding: 6px;
    }
    
    .grid-item img {
        height: 50px;
    }
    
    .grid-item .name {
        font-size: 10px;
    }
    
    .grid-item .price {
        font-size: 12px;
    }
    
    .selected-skins-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .selected-skin-item {
        padding: 6px;
        min-width: 100px;
    }
    
    .selected-skin-item img {
        height: 60px;
    }
    
    .selected-skin-item .name {
        font-size: 10px;
    }
    
    .selected-skin-item .price {
        font-size: 10px;
    }
    
    .market-filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
        font-size: 14px;
    }
    
    .pagination-container {
        margin-top: 10px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .roll-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 5px;
    }
    
    .slot-card {
        padding: 10px;
        min-height: 120px;
    }
    
    .wheel-container {
        width: 200px;
        height: 200px;
    }
    
    #upgrade-wheel {
        width: 200px;
        height: 200px;
    }
    
    .chance-buttons {
        gap: 3px;
    }
    
    .chance-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 40px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
        padding: 8px;
    }
    
    .grid-item {
        padding: 4px;
    }
    
    .grid-item img {
        height: 40px;
    }
    
    .grid-item .name {
        font-size: 9px;
    }
    
    .grid-item .price {
        font-size: 11px;
    }
    
    .selected-skins-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px;
    }
    
    .selected-skin-item {
        padding: 4px;
        min-width: 80px;
    }
    
    .selected-skin-item img {
        height: 50px;
    }
    
    .selected-skin-item .name {
        font-size: 9px;
    }
    
    .selected-skin-item .price {
        font-size: 9px;
    }
}