.st-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* ===== Tabs ===== */
.st-tabs {
    display: flex; gap: 4px; margin-bottom: 16px; padding: 4px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 14px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.st-tabs::-webkit-scrollbar { height: 0; }
.st-tab {
    display: flex; align-items: center; gap: 6px; padding: 10px 16px; border: none;
    background: transparent; color: var(--text-secondary); font-size: 15px; font-weight: 600;
    border-radius: 10px; cursor: pointer; white-space: nowrap; transition: all .2s;
}
.st-tab:hover { color: var(--text-primary); background: rgba(102,192,244,.06); }
.st-tab.active { background: rgba(102,192,244,.14); color: #66c0f4; }
.st-tab svg { flex-shrink: 0; }
.st-tab-pane { display: none; }
.st-tab-pane.active { display: block; }

/* ===== Search ===== */
.st-search-card { padding: 28px; margin-bottom: 20px; position: relative; overflow: visible !important; }
.st-search-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.st-logo-wrap {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, #1b2838, #2a475e);
    display: flex; align-items: center; justify-content: center;
    color: #66c0f4; box-shadow: 0 4px 16px rgba(102,192,244,.25);
    border: 2px solid rgba(102,192,244,.25);
}
.st-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }
.st-subtitle { font-size: 15px; color: var(--text-secondary); margin: 2px 0 0; }

.st-search-row {
    display: flex; align-items: center; gap: 0;
    background: rgba(0,0,0,.25); border: 1px solid var(--glass-border);
    border-radius: 12px; transition: border-color .2s;
}
.st-search-row:focus-within { border-color: #66c0f4; }
.st-search-input-wrap { flex: 1; position: relative; }
.st-search-input {
    width: 100%; background: transparent; border: none; color: var(--text-primary);
    font-size: 16px; font-weight: 500; padding: 14px 16px; outline: none;
}
.st-search-input::placeholder { color: var(--text-secondary); opacity: .5; font-weight: 400; }
.st-search-btn {
    display: flex; align-items: center; gap: 6px; padding: 12px 22px; margin: 4px;
    background: linear-gradient(135deg, #66c0f4, #2a475e); border: none; border-radius: 10px;
    color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: transform .15s, box-shadow .2s; box-shadow: 0 2px 12px rgba(102,192,244,.25); white-space: nowrap;
}
.st-search-btn svg { width: 18px; height: 18px; }
.st-search-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(102,192,244,.35); }
.st-search-btn:active { transform: translateY(0); }
.st-search-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.st-hint { font-size: 13px; color: var(--text-secondary); margin: 10px 0 0; opacity: .6; }
.st-hint code { background: rgba(102,192,244,.1); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #66c0f4; }

.st-my-btn {
    position: absolute; top: 14px; right: 14px;
    padding: 8px 16px; border: 1px solid rgba(102,192,244,.3); border-radius: 8px;
    background: rgba(102,192,244,.08); color: #66c0f4; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.st-my-btn:hover { background: rgba(102,192,244,.16); border-color: #66c0f4; }

/* Suggestions */
.st-suggestions {
    display: none; position: absolute; left: 0; right: 0; z-index: 100;
    background: rgba(20,20,35,.97); border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
    margin-top: -8px; max-height: 260px; overflow-y: auto; backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.st-suggest-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    cursor: pointer; transition: background .15s; border-bottom: 1px solid rgba(255,255,255,.04);
}
.st-suggest-item:last-child { border-bottom: none; }
.st-suggest-item:hover { background: rgba(102,192,244,.08); }
.st-suggest-id { font-size: 14px; font-weight: 700; color: #66c0f4; white-space: nowrap; }
.st-suggest-name { flex: 1; font-size: 14px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-suggest-del {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    border: none; background: rgba(255,255,255,.06); border-radius: 6px;
    color: var(--text-muted); font-size: 16px; cursor: pointer; transition: all .15s;
    flex-shrink: 0; line-height: 1;
}
.st-suggest-del:hover { background: rgba(239,68,68,.2); color: #f87171; }

/* Loading / Error */
.st-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--text-secondary); font-size: 16px; }
.st-spinner { width: 24px; height: 24px; border: 3px solid rgba(102,192,244,.2); border-top-color: #66c0f4; border-radius: 50%; animation: stSpin .7s linear infinite; }
@keyframes stSpin { to { transform: rotate(360deg); } }
.st-error { display: flex; align-items: center; gap: 10px; padding: 16px 20px; margin-bottom: 20px; color: #f87171; font-size: 15px; }

/* ===== Profile ===== */
.st-profile { padding: 24px; margin-bottom: 16px; }
.st-profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.st-avatar {
    width: 84px; height: 84px; border-radius: 18px; object-fit: cover; flex-shrink: 0;
    border: 3px solid rgba(102,192,244,.3); box-shadow: 0 4px 20px rgba(102,192,244,.2);
}
.st-profile-info { flex: 1; min-width: 0; }
.st-profile-name { font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 0; }
.st-profile-id { font-size: 14px; color: var(--text-muted); font-family: monospace; margin-top: 2px; }
.st-profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-badge {
    padding: 4px 12px; border-radius: 6px; font-size: 13px; font-weight: 600;
}
.st-badge-online { background: rgba(87,203,119,.15); color: #57cb77; }
.st-badge-ingame { background: rgba(102,192,244,.15); color: #66c0f4; }
.st-badge-offline { background: rgba(156,163,175,.15); color: #9ca3af; }
.st-badge-vac { background: rgba(239,68,68,.15); color: #ef4444; }
.st-badge-level { background: rgba(102,192,244,.15); color: #66c0f4; }
.st-badge-country { background: rgba(255,255,255,.06); color: var(--text-secondary); }

.st-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
    margin-top: 16px;
}
.st-stat {
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 14px;
    backdrop-filter: blur(12px); padding: 16px 12px; text-align: center;
}
.st-stat-val { font-size: 26px; font-weight: 800; }
.st-stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.st-blue { color: #66c0f4; }
.st-green { color: #57cb77; }
.st-gold { color: #f59e0b; }
.st-red { color: #ef4444; }
.st-purple { color: #a78bfa; }

/* Download button */
.st-dl-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
    background: linear-gradient(135deg, #66c0f4, #2a475e); border: none; border-radius: 12px;
    color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: transform .2s, box-shadow .2s; box-shadow: 0 4px 16px rgba(102,192,244,.2);
}
.st-dl-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(102,192,244,.3); }

/* ===== Sections ===== */
.st-section { padding: 20px 24px; margin-bottom: 16px; }
.st-section h3 { font-size: 18px; font-weight: 700; margin: 0 0 14px; color: var(--text-primary); }

/* Badges */
.st-badges-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.st-badge-card {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    background: rgba(255,255,255,.03); border: 1px solid var(--glass-border); border-radius: 10px;
}
.st-badge-icon { width: 32px; height: 32px; border-radius: 6px; }
.st-badge-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.st-badge-xp { font-size: 13px; color: #66c0f4; }

/* Recent Games */
.st-recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.st-game-card {
    background: rgba(255,255,255,.03); border: 1px solid var(--glass-border); border-radius: 12px;
    overflow: hidden; transition: transform .2s, border-color .2s;
}
.st-game-card:hover { transform: translateY(-2px); border-color: rgba(102,192,244,.3); }
.st-game-img { width: 100%; height: 100px; object-fit: cover; display: block; background: rgba(0,0,0,.3); }
.st-game-info { padding: 10px 12px; }
.st-game-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-game-hours { font-size: 14px; color: #66c0f4; }
.st-game-hours-2w { font-size: 13px; color: var(--text-muted); margin-left: 6px; }

/* Friends */
.st-friends-row { display: flex; align-items: center; gap: 16px; }
.st-friends-val { font-size: 36px; font-weight: 900; color: #66c0f4; }
.st-friends-label { font-size: 16px; color: var(--text-secondary); }

/* ===== Library ===== */
.st-lib-card { padding: 20px 24px; margin-bottom: 16px; }
.st-lib-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--text-primary); }
.st-lib-controls {
    display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center;
}
.st-select {
    background: rgba(0,0,0,.3); border: 1px solid var(--glass-border); border-radius: 10px;
    color: var(--text-primary); padding: 10px 16px; font-size: 16px; outline: none;
    cursor: pointer; transition: border-color .2s;
}
.st-select:focus { border-color: #66c0f4; }
.st-lib-stats {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
    margin-bottom: 16px;
}
/* Chart + Legend */
.st-chart-row {
    display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.st-chart-row canvas { max-width: 280px; flex-shrink: 0; }
.st-chart-legend { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.st-chart-legend-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    background: rgba(255,255,255,.03); border-radius: 8px; transition: background .15s;
}
.st-chart-legend-item:hover { background: rgba(255,255,255,.07); }
.st-chart-legend-dot {
    width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}
.st-chart-legend-name {
    flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-chart-legend-hours { font-size: 13px; color: #66c0f4; white-space: nowrap; font-weight: 600; }
.st-chart-legend-pct { font-size: 13px; color: var(--text-muted); width: 36px; text-align: right; flex-shrink: 0; }

.st-lib-game {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: rgba(255,255,255,.02); border: 1px solid var(--glass-border); border-radius: 12px;
    transition: background .2s, border-color .2s; cursor: default;
}
.st-lib-game:hover { background: rgba(102,192,244,.04); border-color: rgba(102,192,244,.2); }
.st-lib-game-img { width: 72px; height: 34px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: rgba(0,0,0,.3); }
.st-lib-game-info { flex: 1; min-width: 0; }
.st-lib-game-name { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-lib-game-time { font-size: 14px; color: #66c0f4; }
.st-lib-game-2w { font-size: 13px; color: var(--text-muted); }
.st-lib-collapse-btn {
    display: block; width: 100%; padding: 14px; margin-top: 8px;
    background: rgba(102,192,244,.06); border: 1px dashed rgba(102,192,244,.2); border-radius: 12px;
    color: #66c0f4; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background .2s; text-align: center;
}
.st-lib-collapse-btn:hover { background: rgba(102,192,244,.12); }
.st-lib-hidden { display: none; }

/* ===== Achievements ===== */
.st-ach-card { padding: 20px 24px; margin-bottom: 16px; }
.st-ach-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--text-primary); }
.st-ach-controls { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

.st-ach-summary {
    display: flex; align-items: center; gap: 20px; padding: 20px 24px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px;
    margin-bottom: 16px;
}
.st-ach-progress-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.st-ach-progress-ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.st-ach-progress-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.st-ach-progress-bg { stroke: rgba(102,192,244,.15); }
.st-ach-progress-fg { stroke: #66c0f4; transition: stroke-dashoffset .6s ease; }
.st-ach-pct {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: #66c0f4;
}
.st-ach-meta { flex: 1; }
.st-ach-game-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.st-ach-counts { font-size: 15px; color: var(--text-secondary); }

.st-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.st-ach-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: rgba(255,255,255,.02); border: 1px solid var(--glass-border); border-radius: 12px;
    transition: background .2s;
}
.st-ach-item.achieved { border-color: rgba(102,192,244,.2); background: rgba(102,192,244,.04); }
.st-ach-icon { width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0; background: rgba(0,0,0,.3); }
.st-ach-icon.locked { filter: grayscale(1) opacity(.4); }
.st-ach-text { flex: 1; min-width: 0; }
.st-ach-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.st-ach-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.st-ach-date { font-size: 12px; color: #66c0f4; margin-top: 4px; }

/* ===== Compare ===== */
.st-compare-card { padding: 24px; margin-bottom: 16px; }
.st-compare-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 14px; color: var(--text-primary); }
.st-compare-inputs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-compare-group { flex: 1; min-width: 180px; position: relative; }
.st-compare-group .st-search-input { border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(0,0,0,.25); }
.st-compare-group .st-search-input:focus { border-color: #66c0f4; }
.st-compare-group .st-my-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 8px; font-size: 13px; }
.st-compare-vs { font-size: 18px; font-weight: 900; color: #66c0f4; flex-shrink: 0; }

.st-cmp-table {
    width: 100%; border-collapse: separate; border-spacing: 0 6px;
    margin-top: 16px;
}
.st-cmp-table td { padding: 12px 16px; font-size: 16px; }
.st-cmp-table td:first-child { text-align: right; font-weight: 700; width: 35%; }
.st-cmp-table td:nth-child(2) { text-align: center; color: var(--text-secondary); font-size: 14px; width: 30%; }
.st-cmp-table td:last-child { text-align: left; font-weight: 700; width: 35%; }
.st-cmp-row { background: rgba(255,255,255,.02); border-radius: 10px; }
.st-cmp-row td:first-child { border-radius: 10px 0 0 10px; }
.st-cmp-row td:last-child { border-radius: 0 10px 10px 0; }
.st-cmp-winner { color: #57cb77; }
.st-cmp-loser { color: var(--text-muted); }

.st-cmp-score {
    display: flex; justify-content: center; gap: 24px; align-items: center;
    padding: 20px; margin-bottom: 16px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px;
}
.st-cmp-score-block { text-align: center; }
.st-cmp-score-val { font-size: 48px; font-weight: 900; }
.st-cmp-score-name { font-size: 15px; color: var(--text-secondary); margin-top: 4px; }

.st-cmp-common { margin-top: 20px; }
.st-cmp-common h4 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px; }
.st-cmp-common-game {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
    padding: 10px 16px; margin-bottom: 4px;
    background: rgba(255,255,255,.02); border-radius: 10px; font-size: 15px;
}
.st-cmp-common-name { text-align: center; color: var(--text-secondary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Inventory ===== */
.st-inv-card { padding: 20px 24px; margin-bottom: 16px; }
.st-inv-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--text-primary); }
.st-inv-controls { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.st-inv-summary {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
    margin-bottom: 16px;
}
.st-inv-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.st-inv-item {
    display: flex; flex-direction: column; align-items: center; padding: 12px 8px;
    background: rgba(255,255,255,.02); border: 1px solid var(--glass-border); border-radius: 12px;
    transition: transform .2s, border-color .2s, background .2s; position: relative; cursor: default;
}
.st-inv-item:hover { transform: translateY(-2px); border-color: rgba(102,192,244,.3); background: rgba(102,192,244,.04); }
.st-inv-item-img {
    width: 100px; height: 75px; object-fit: contain; border-radius: 6px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); margin-bottom: 8px;
}
.st-inv-item-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary); text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; line-height: 1.3;
}
.st-inv-item-type {
    font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.st-inv-item-price {
    font-size: 14px; font-weight: 700; color: #57cb77; margin-top: 6px;
}
.st-inv-item-price.loading { color: var(--text-muted); font-size: 11px; font-weight: 400; }
.st-inv-item-amount {
    position: absolute; top: 6px; right: 6px; background: rgba(102,192,244,.2);
    color: #66c0f4; font-size: 11px; font-weight: 700; padding: 2px 7px;
    border-radius: 6px; line-height: 1.3;
}
.st-inv-item-rarity {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px; border-radius: 0 0 12px 12px;
}
.st-inv-item-badge {
    font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-top: 4px; font-weight: 600;
}
.st-inv-item-badge.tradable { background: rgba(87,203,119,.12); color: #57cb77; }
.st-inv-item-badge.not-tradable { background: rgba(239,68,68,.1); color: #ef4444; }
.st-inv-price-loading {
    text-align: center; padding: 12px; font-size: 14px; color: var(--text-secondary);
    margin-bottom: 12px;
}
.st-inv-price-wrap { position: relative; }
.st-inv-price-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(87,203,119,.2); border-top-color: #57cb77;
    border-radius: 50%; animation: stInvSpin .8s linear infinite;
    vertical-align: middle; margin-left: 6px;
}
.st-inv-price-progress {
    font-size: 12px; color: var(--text-muted); margin-top: 4px;
    transition: opacity .3s;
}
@keyframes stInvSpin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .st-profile-header { flex-direction: column; text-align: center; }
    .st-avatar { width: 72px; height: 72px; }
    .st-profile-name { font-size: 22px; }
    .st-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .st-stat-val { font-size: 22px; }
    .st-stat-label { font-size: 12px; }
    .st-compare-inputs { flex-direction: column; }
    .st-compare-vs { margin: 4px 0; }
    .st-ach-summary { flex-direction: column; text-align: center; }
    .st-cmp-table td { font-size: 14px; padding: 10px 10px; }
    .st-cmp-table td:nth-child(2) { font-size: 13px; }
    .st-cmp-score-val { font-size: 36px; }
    .st-lib-controls { flex-direction: column; }
    .st-my-btn { position: static; margin-bottom: 10px; }
    .st-tab { font-size: 14px; padding: 10px 14px; }
    .st-search-input { font-size: 16px; }
    .st-lib-game-name { font-size: 14px; }
    .st-lib-game-time { font-size: 13px; }
    .st-ach-name { font-size: 14px; }
    .st-ach-desc { font-size: 12px; }
    .st-chart-legend-name { font-size: 13px; }
    .st-chart-legend-hours { font-size: 12px; }
    .st-chart-legend-pct { font-size: 12px; }
    .st-cmp-common-game { font-size: 14px; }
    .st-inv-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .st-inv-item-img { width: 80px; height: 60px; }
    .st-inv-controls { flex-direction: column; }
}
