.market-page { padding: 0 20px 20px; }
.market-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.market-header h1 { font-size: 28px; color: #1a2a3f; display: flex; align-items: center; gap: 12px; }
.market-header h1 i { color: #e01a3f; }
.market-header-right { display: flex; align-items: center; gap: 12px; }
.market-count { color: #8b95a5; font-size: 14px; }
.btn-market { border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn-market-sell { background: #e01a3f; color: #fff; }
.btn-market-sell:hover { background: #c01535; }
.btn-sell-link { background: linear-gradient(135deg, #1a2535 0%, #283852 100%); border: 1px solid #3d5270; color: #fff; text-decoration: none; }
.btn-sell-link:hover { background: linear-gradient(135deg, #223047 0%, #32456a 100%); border-color: #4a6080; color: #fff; text-decoration: none; }
.btn-market-bid { background: #2a3f5f; color: #fff; flex: 1; border: 1px solid #4a6080; }
.btn-market-bid:hover { background: #3a5578; }
.btn-market-buyout { background: #f5a623; color: #fff; flex: 1; }
.btn-market-buyout:hover { background: #d98f15; }
.btn-market-cancel { background: rgba(255,255,255,0.1); color: #9aafc5; width: 100%; border: 1px solid #4a6080; }
.btn-market-cancel:hover { background: rgba(255,255,255,0.18); color: #fc8181; }
.btn-market-close { background: #f0f2f5; color: #555; }
.market-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.market-select { padding: 8px 12px; border: 1px solid #dde1e7; border-radius: 8px; background: #fff; font-size: 13px; }
.market-search { display: flex; flex: 1; min-width: 200px; }
.market-search input { flex: 1; padding: 8px 12px; border: 1px solid #dde1e7; border-radius: 8px 0 0 8px; border-right: none; font-size: 13px; }
.market-search button { padding: 8px 14px; border: 1px solid #dde1e7; border-radius: 0 8px 8px 0; background: #fff; cursor: pointer; color: #8b95a5; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.market-timer { font-size: 12px; color: #9aafc5; }
.market-timer.ending { color: #fc8181; font-weight: 600; }
.market-scopes { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.market-scope { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #dde1e7; border-radius: 999px; background: #fff; color: #4a5568; font-size: 13px; text-decoration: none; transition: all .2s; }
.market-scope i { font-size: 11px; color: #8b95a5; }
.market-scope:hover { border-color: #b9c1cc; color: #1a2a3f; text-decoration: none; }
.market-scope.active { background: #e01a3f; border-color: #e01a3f; color: #fff; }
.market-scope.active i { color: #fff; }
.market-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 20px; color: #8b95a5; }
.market-empty i { font-size: 48px; margin: 0 auto 12px; display: block; color: #dde1e7; }
.market-empty .hint { font-size: 13px; margin-top: 4px; }
.market-pagination { display: flex; justify-content: center; gap: 8px; margin: 24px 0; }
.mine-price { color: #e01a3f; font-weight: 600; }
.mine-price i { color: #f5a623; font-size: 11px; }
.mine-bids { color: #8b95a5; }
.market-modal { position: fixed; inset: 0; background: rgba(16,24,36,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.market-modal[hidden] { display: none; }
.market-modal-box { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 440px; max-height: 85vh; overflow-y: auto; }
.market-modal-box h3 { color: #1a2a3f; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; font-size: 17px; }
.market-modal-box h3 i { color: #e01a3f; }
.market-modal-box label { display: block; font-size: 13px; color: #4a5568; margin-bottom: 10px; }
.market-modal-box input, .market-modal-box select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #dde1e7; border-radius: 8px; font-size: 14px; }
.market-hint { font-size: 12px; color: #8b95a5; margin: 10px 0; }
.market-modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.market-modal-actions .btn-market { flex: 1; }
@media (max-width: 600px) { .market-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

/* --- Карточка лота: одна разметка для всей витрины --- */
.market-page .item-card { cursor: pointer; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; display: flex; }
.market-page .item-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.market-page .item-card-inner { background: #1a2535; border-radius: 12px; padding: 16px; text-align: center; position: relative; display: flex; flex-direction: column; width: 100%; box-sizing: border-box; }
.market-page .rarity-Обычный .item-card-inner { border: 2px solid #718096; }
.market-page .rarity-Необычный .item-card-inner { border: 2px solid #48bb78; }
.market-page .rarity-Редкий .item-card-inner { border: 2px solid #4299e1; }
.market-page .rarity-Эпический .item-card-inner { border: 2px solid #9f7aea; }
.market-page .rarity-Легендарный .item-card-inner { border: 2px solid #ecc94b; box-shadow: 0 0 20px rgba(236, 201, 75, 0.2); }
.market-page .rarity-Мифический .item-card-inner { border: 2px solid #fc8181; box-shadow: 0 0 30px rgba(252, 129, 129, 0.3); }
.market-page .item-rarity-badge { position: absolute; top: 8px; right: 8px; font-size: 9px; text-transform: uppercase; background: rgba(0,0,0,0.7); padding: 2px 8px; border-radius: 4px; color: #9aafc5; }
.market-page .rarity-Обычный .item-rarity-badge { color: #718096; }
.market-page .rarity-Необычный .item-rarity-badge { color: #48bb78; }
.market-page .rarity-Редкий .item-rarity-badge { color: #4299e1; }
.market-page .rarity-Эпический .item-rarity-badge { color: #9f7aea; }
.market-page .rarity-Легендарный .item-rarity-badge { color: #ecc94b; }
.market-page .rarity-Мифический .item-rarity-badge { color: #fc8181; }
.market-page .item-status-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; background: rgba(0,0,0,0.7); padding: 2px 8px; border-radius: 4px; color: #9aafc5; }
.market-page .item-status-badge.status-own { color: #9aafc5; }
.market-page .item-icon { font-size: 48px; color: #5a7a9a; margin: 12px 0; height: 88px; display: flex; align-items: center; justify-content: center; }
.market-page .item-icon img { width: 88px; height: 88px; object-fit: contain; }
.market-page .item-name { color: white; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.market-page .item-name-link { color: inherit; text-decoration: none; }
.market-page .item-name-link:hover { color: #e01a3f; text-decoration: underline; }
.market-page .item-category { font-size: 11px; color: #9aafc5; text-transform: uppercase; margin-bottom: 10px; }
/* Ссылка на страницу вида предмета: все экземпляры и цены */
.market-page .item-cat-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(154,175,197,0.55); }
.market-page .item-cat-link:hover { color: #ecc94b; border-bottom-color: #ecc94b; }
.market-page .item-market-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9aafc5; margin-bottom: 10px; }
.market-page .item-market-meta .mine-price { color: #ecc94b; font-weight: 600; }
.market-page .item-card-inner .item-actions { margin-top: auto; }
.market-page .btn-cancel-card { width: 100%; border: 1px solid #4a6080; background: rgba(255,255,255,0.06); color: #9aafc5; border-radius: 8px; padding: 8px 10px; font-size: 12px; cursor: pointer; transition: all .2s; }
.market-page .btn-cancel-card:hover { background: #e01a3f; border-color: #e01a3f; color: #fff; }
.market-page .item-card .market-timer { font-size: 12px; color: #9aafc5; margin-bottom: 6px; }
.market-page .item-status-badge.status-leading { background: rgba(31, 170, 89, 0.18); color: #1faa59; }
.market-empty .hint a { color: #e01a3f; font-weight: 600; }
