:root {
    --trade-gold: #f4c15d;
    --trade-red: #e43131;
    --trade-panel: rgba(13, 14, 18, .96);
    --trade-border: rgba(244, 193, 93, .22);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(187, 26, 26, .20), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(244, 193, 93, .09), transparent 25%),
        linear-gradient(180deg, #09090b, #050506 65%);
}

.trade-page { max-width: 1280px; margin: 0 auto; padding: 34px 20px 80px; }
.trade-hero { display: flex; justify-content: space-between; gap: 28px; align-items: center; padding: 34px; border: 1px solid var(--trade-border); border-radius: 26px; background: linear-gradient(135deg, rgba(31, 14, 14, .97), rgba(10, 11, 14, .98)); box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.trade-hero h1 { margin: 4px 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1; }
.trade-hero p { margin: 0; color: #b9b9bf; max-width: 720px; line-height: 1.6; }
.trade-kicker { color: var(--trade-gold); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.trade-wallet { min-width: 240px; text-align: center; padding: 20px 26px; border-radius: 20px; border: 1px solid rgba(244,193,93,.35); background: rgba(244,193,93,.07); }
.trade-wallet span, .trade-wallet small { display: block; color: #c9c2b4; }
.trade-wallet strong { display: block; margin: 5px 0; color: var(--trade-gold); font-size: 38px; }

.trade-alert { margin: 18px 0; padding: 15px 18px; border-radius: 14px; border: 1px solid transparent; }
.trade-alert p { margin: 7px 0 0; }
.trade-alert--success { color: #baf7cb; background: rgba(31, 165, 72, .14); border-color: rgba(68, 218, 112, .3); }
.trade-alert--error { color: #ffd1d1; background: rgba(207, 44, 44, .15); border-color: rgba(255, 82, 82, .34); }
.trade-alert--notice { color: #ffe7b0; background: rgba(244,193,93,.10); border-color: rgba(244,193,93,.28); }

.trade-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.trade-status-grid article { padding: 18px 20px; border-radius: 17px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); }
.trade-status-grid span, .trade-status-grid small { display: block; color: #9899a2; }
.trade-status-grid strong { display: block; margin: 5px 0; font-size: 22px; }

.trade-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; padding: 7px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.trade-tabs a { padding: 11px 16px; border-radius: 11px; color: #c7c7cc; text-decoration: none; font-weight: 800; }
.trade-tabs a span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 12px; }
.trade-tabs a:hover, .trade-tabs a.is-active { color: #fff; background: linear-gradient(135deg, rgba(206,34,34,.88), rgba(121,14,14,.9)); }

.trade-panel { padding: 24px; border: 1px solid rgba(255,255,255,.08); border-radius: 22px; background: var(--trade-panel); box-shadow: 0 18px 55px rgba(0,0,0,.3); }
.trade-panel__head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 20px; }
.trade-panel h2 { margin: 4px 0 4px; font-size: 28px; }
.trade-panel p { color: #9fa0a8; }
.trade-search { width: min(320px, 100%); padding: 12px 14px; color: #fff; background: #101116; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; }

.trade-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; }
.trade-card { overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: linear-gradient(180deg, #17181e, #0e0f13); transition: transform .2s ease, border-color .2s ease; }
.trade-card:hover { transform: translateY(-3px); border-color: rgba(244,193,93,.38); }
.trade-card[hidden] { display: none !important; }
.trade-card__image { position: relative; display: grid; place-items: center; min-height: 260px; padding: 14px; background: radial-gradient(circle, rgba(255,255,255,.07), transparent 65%); }
.trade-card__image img { width: 100%; height: 245px; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(0,0,0,.45)); }
.trade-rarity { position: absolute; left: 12px; bottom: 12px; padding: 5px 9px; border-radius: 99px; background: rgba(7,7,9,.86); border: 1px solid currentColor; font-size: 11px; font-weight: 900; }
.trade-rarity--common { color: #d4d4d4; }
.trade-rarity--rare { color: #65b9ff; }
.trade-rarity--epic { color: #ce76ff; }
.trade-rarity--legendary { color: #ffb84b; }
.trade-rarity--mythic { color: #ff5f79; }
.trade-card__body { padding: 16px; }
.trade-card__body > small { color: #747781; }
.trade-card h3 { min-height: 44px; margin: 4px 0 12px; font-size: 17px; line-height: 1.28; }
.trade-card__numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 11px; }
.trade-card__numbers span { padding: 9px; border-radius: 10px; background: rgba(255,255,255,.045); color: #9497a1; font-size: 12px; }
.trade-card__numbers strong { display: block; color: #fff; font-size: 18px; }
.trade-price { margin: 9px 0; color: var(--trade-gold); font-size: 18px; font-weight: 900; }
.trade-price--earn { color: #73e99a; }
.trade-card__cooldown, .trade-card__warning { margin: 5px 0; font-size: 12px; }
.trade-card__warning { color: #f2c66e !important; }
.trade-form { display: grid; gap: 9px; margin-top: 13px; }
.trade-form label { color: #9fa0a8; font-size: 12px; }
.trade-form select { width: 100%; margin-top: 5px; padding: 10px; color: #fff; background: #0c0d11; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; }
.trade-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 900; cursor: pointer; }
.trade-btn--primary { background: linear-gradient(135deg, #db2828, #8d1111); box-shadow: 0 9px 24px rgba(197,25,25,.22); }
.trade-btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }

.trade-empty { padding: 45px 22px; text-align: center; }
.trade-empty__icon { font-size: 48px; }
.trade-empty h2, .trade-empty h3 { margin-bottom: 6px; }
.trade-empty p { max-width: 600px; margin: 0 auto 20px; }

.trade-history { display: grid; gap: 9px; }
.trade-history article { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; padding: 13px 15px; border-radius: 13px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.065); }
.trade-history__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.06); font-size: 21px; }
.trade-history small { display: block; color: #858892; }
.trade-history__amount { text-align: right; font-size: 18px; font-weight: 900; }
.trade-history__amount.is-credit { color: #72e596; }
.trade-history__amount.is-debit { color: #ff7878; }

@media (max-width: 850px) {
    .trade-hero { align-items: stretch; flex-direction: column; padding: 25px; }
    .trade-wallet { min-width: 0; }
    .trade-status-grid { grid-template-columns: 1fr; }
    .trade-panel__head { align-items: stretch; flex-direction: column; }
    .trade-search { width: 100%; }
}

@media (max-width: 520px) {
    .trade-page { padding: 22px 12px 60px; }
    .trade-panel { padding: 15px; border-radius: 17px; }
    .trade-card-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .trade-card__image { min-height: 175px; padding: 7px; }
    .trade-card__image img { height: 170px; }
    .trade-card__body { padding: 11px; }
    .trade-card h3 { min-height: 50px; font-size: 14px; }
    .trade-card__numbers { grid-template-columns: 1fr; }
    .trade-price { font-size: 15px; }
    .trade-history article { grid-template-columns: 38px 1fr; }
    .trade-history__amount { grid-column: 2; text-align: left; }
}
