
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: linear-gradient(160deg, #0f0f1a 0%, #161630 50%, #0f0f1a 100%); color: #e8e8f0; padding: 16px; max-width: 800px; margin: 0 auto; transition: background 0.8s ease; position: relative; }
body::before { content: ''; position: fixed; inset: -10px; z-index: -1; background-size: cover; background-position: center; opacity: 0.08; transition: opacity 0.8s ease; pointer-events: none; animation: bgBreathe 20s ease-in-out infinite alternate; }
body.tab-trophy::before { background-image: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/1086940/header.jpg'); }
body.tab-discounts::before { background-image: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/271590/header.jpg'); }
body.tab-psnine::before { background-image: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/2358720/header.jpg'); }
body.tab-mods::before { background-image: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/1085660/header.jpg'); }
body.tab-news::before { background-image: url('https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/730/header.jpg'); }
@keyframes bgBreathe {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.05) translate(-1%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}
.tab-accent { height: 3px; border-radius: 3px; margin-bottom: 12px; position: relative; overflow: hidden; transition: background 0.5s ease; }
.tab-accent.trophy { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.tab-accent.discounts { background: linear-gradient(90deg, #34d399, #059669); }
.tab-accent.psnine { background: linear-gradient(90deg, #5dade2, #3b82f6); }
.tab-accent.mods { background: linear-gradient(90deg, #f97316, #ea580c); }
.tab-accent.news { background: linear-gradient(90deg, #5dade2, #38bdf8); }
/* Steam achievements */
.steam-game-section { background: rgba(26,26,46,0.5); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.steam-game-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.steam-game-name { font-size: 14px; font-weight: 700; color: #e8e8f0; }
.steam-game-progress { font-size: 12px; color: #888; }
.steam-progress-bar { height: 4px; background: #2a2a3e; border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.steam-progress-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.steam-achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.achv-card { display: flex; gap: 8px; padding: 6px 8px; background: rgba(15,15,26,0.4); border-radius: 8px; align-items: flex-start; }
.achv-locked { opacity: 0.4; filter: grayscale(0.8); }
.achv-icon { width: 36px; height: 36px; border-radius: 4px; flex-shrink: 0; }
.achv-info { flex: 1; min-width: 0; }
.achv-name { font-size: 11px; font-weight: 600; color: #e8e8f0; line-height: 1.2; }
.achv-desc { font-size: 10px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.achv-date { font-size: 10px; color: #34d399; margin-top: 2px; }
.tab-accent::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}
/* 粒子背景 */
.particles { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.particle { position: absolute; pointer-events: none; animation: particleFloat linear infinite; font-size: 14px; }
.particle.text-particle { animation: particleFloat linear infinite, textGlow 3s ease-in-out infinite alternate; }
@keyframes particleFloat {
  0% { transform: translateY(-5vh) rotate(0deg); opacity: 0; }
  20% { opacity: 0.7; transform: translateY(10vh) rotate(60deg); }
  80% { opacity: 0.5; transform: translateY(80vh) rotate(300deg); }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}
@keyframes textGlow {
  0% { color: #a855f7; text-shadow: 0 0 4px rgba(168,85,247,0.5); }
  33% { color: #f97316; text-shadow: 0 0 4px rgba(249,115,22,0.5); }
  66% { color: #22d3ee; text-shadow: 0 0 4px rgba(34,211,238,0.5); }
  100% { color: #a855f7; text-shadow: 0 0 4px rgba(168,85,247,0.5); }
}
.tab-content-fade { animation: tabFlipIn 0.3s cubic-bezier(0.05, 0.7, 0.1, 1) forwards; }
@keyframes tabFlipIn {
  0% { opacity: 0.3; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.tab-bar { display: flex; gap: 4px; margin-bottom: 0; position: sticky; top: 0; background: #0f0f1a; padding: 6px 0; z-index: 10; }
.tab-btn { flex: 1; padding: 6px 0; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: #666; transition: all 0.2s; }
.tab-btn.active { background: #1a1a2e; color: #e8e8f0; }
.tab-btn:active { background: #2a2a3e; }
.sub-tab-bar { display: flex; gap: 4px; margin-bottom: 12px; }
.sub-tab-btn { padding: 5px 14px; border: none; border-radius: 5px; font-size: 12px; font-weight: 500; cursor: pointer; background: transparent; color: #555; transition: all 0.2s; }
.sub-tab-btn.active { background: #1f1f32; color: #e8e8f0; } 
h1 { text-align: center; font-size: 20px; padding: 8px 0; }
.subtitle { text-align: center; color: #888; font-size: 13px; margin-bottom: 16px; }
.last-update { text-align: center; color: #555; font-size: 11px; margin-bottom: 12px; }
/* Discounts */
.platform { margin-bottom: 24px; }
.platform h2 { font-size: 18px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #2a2a3e; }
.game-list { display: flex; flex-direction: column; gap: 10px; }
.game-card { background: #1a1a2e; border-radius: 12px; padding: 10px 12px; }
.game-card-inner { display: flex; gap: 12px; }
.card-left { flex-shrink: 0; }
.game-thumb { width: 80px; height: 45px; border-radius: 6px; object-fit: cover; display: block; }
.card-right { flex: 1; min-width: 0; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.game-name { font-size: 15px; font-weight: 600; }
.discount-badge { padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.disc-high { background: #e74c3c22; color: #ff6b6b; border: 1px solid #e74c3c44; }
.disc-mid { background: #e67e2222; color: #ffb347; border: 1px solid #e67e2244; }
.disc-low { background: #2ecc7122; color: #6fcf97; border: 1px solid #2ecc7144; }
.card-price { font-size: 16px; font-weight: 700; color: #5dade2; margin-top: 6px; }
.card-rating { font-size: 12px; color: #aaa; margin-top: 4px; }
.cn-tag { font-size: 12px; color: #e8b84b; margin-left: 8px; }
.top5 { margin-top: 28px; }
.top5 h2 { font-size: 18px; margin-bottom: 12px; }
.plat-tag { display: inline-block; margin-left: 6px; font-size: 12px; vertical-align: middle; }
.medal { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 6px; margin-right: 8px; vertical-align: middle; position: relative; overflow: hidden; letter-spacing: 1px; }
.medal::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 30%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.2) 70%, transparent 100%); background-size: 200% 100%; animation: medalShine 2s linear infinite; }
.medal-1 { background: linear-gradient(135deg, #f59e0b, #eab308, #f59e0b); color: #1a1a2e; background-size: 200% 200%; animation: medalFlow 3s ease-in-out infinite, medalShine 2s linear infinite; box-shadow: 0 0 12px rgba(245,158,11,0.6); }
.medal-2 { background: linear-gradient(135deg, #a855f7, #c084fc, #a855f7); color: #fff; background-size: 200% 200%; animation: medalFlow 3s ease-in-out infinite, medalShine 2s linear infinite; box-shadow: 0 0 12px rgba(168,85,247,0.6); }
.medal-3 { background: linear-gradient(135deg, #ef4444, #f43f5e, #ef4444); color: #fff; background-size: 200% 200%; animation: medalFlow 3s ease-in-out infinite, medalShine 2s linear infinite; box-shadow: 0 0 12px rgba(239,68,68,0.6); }
.medal-4 { background: linear-gradient(135deg, #34d399, #10b981, #34d399); color: #fff; background-size: 200% 200%; animation: medalFlow 3s ease-in-out infinite, medalShine 2s linear infinite; box-shadow: 0 0 12px rgba(52,211,153,0.6); }
.medal-5 { background: linear-gradient(135deg, #38bdf8, #818cf8, #38bdf8); color: #fff; background-size: 200% 200%; animation: medalFlow 3s ease-in-out infinite, medalShine 2s linear infinite; box-shadow: 0 0 12px rgba(56,189,248,0.6); }
@keyframes medalFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes medalShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.crown { position: absolute; z-index: 2; font-size: 22px; line-height: 1; }
.crown-1 { top: -6px; left: -6px; filter: drop-shadow(0 0 8px rgba(245,158,11,0.8)); animation: crownBounce 2s ease-in-out infinite; }
.crown-2 { top: -4px; left: -4px; font-size: 20px; filter: drop-shadow(0 0 5px rgba(148,163,184,0.6)); animation: crownBounce 2.5s ease-in-out infinite 0.3s; }
.crown-3 { top: -3px; left: -3px; font-size: 18px; filter: drop-shadow(0 0 4px rgba(180,83,9,0.5)); animation: crownBounce 3s ease-in-out infinite 0.6s; }
.card-left { position: relative; }
@keyframes crownBounce { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-3px) rotate(5deg); } }
.top-list { display: flex; flex-direction: column; gap: 8px; }
.top-item { background: #1a1a2e; border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.top-icon { font-size: 16px; }
.top-name { flex: 1; font-weight: 600; }
.top-price { color: #5dade2; font-weight: 600; }
.top-disc { color: #ff6b6b; font-weight: 700; }
.top-rating { color: #aaa; font-size: 12px; }
/* P9 */
.p9-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.p9-item { background: #1a1a2e; border-radius: 12px; padding: 8px; text-decoration: none; color: inherit; transition: background 0.2s; display: flex; flex-direction: column; }
.p9-item:active { background: #2a2a3e; }
.p9-item-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.p9-thumb { width: 100%; aspect-ratio: 2/1; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.p9-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p9-thumb-game { background: linear-gradient(135deg,#2a5a3e,#1a3a2e); font-size: 32px; }
.p9-thumb-low { background: linear-gradient(135deg,#5a4a1e,#3a2e1a); font-size: 32px; }
.p9-thumb-guide { background: linear-gradient(135deg,#3a2a5e,#2a1a3e); font-size: 32px; }
.p9-item-texts { width: 100%; }
.p9-title { font-size: 13px; font-weight: 600; color: #e8e8f0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p9-meta { font-size: 11px; color: #888; margin-top: 2px; }
.news-section { margin-top: 0; padding: 0; }
.news-heading { font-size: 16px; margin-bottom: 12px; color: #5dade2; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.news-card { display: flex; flex-direction: column; gap: 0; background: rgba(26,26,46,0.5); border-radius: 10px; overflow: hidden; text-decoration: none; transition: background 0.2s, transform 0.2s; }
.news-card:active { background: rgba(42,42,62,0.6); transform: scale(0.98); }
.news-img { width: 100%; height: 100px; overflow: hidden; background: #1a1a2e; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #444; }
.news-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.news-source { display: inline-block; font-size: 10px; font-weight: 700; color: #5dade2; margin-bottom: 2px; }
.news-title { font-size: 12px; font-weight: 600; color: #e8e8f0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-desc { font-size: 11px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer { text-align: center; color: #666; font-size: 12px; padding: 24px 0 16px; }
/* Search */
.p9-search-box { display: flex; gap: 8px; margin-bottom: 16px; }
.p9-search-input { flex: 1; padding: 10px 14px; border: 1px solid #2a2a3e; border-radius: 10px; font-size: 14px; background: #1a1a2e; color: #e8e8f0; outline: none; }
.p9-search-input:focus { border-color: #5dade2; }
.p9-search-btn { padding: 10px 16px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; background: #2a2a4e; color: #e8e8f0; cursor: pointer; white-space: nowrap; }
.p9-search-btn:active { background: #3a3a5e; }
/* Mods */
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; padding-right: 30px; }
/* Trophy search */
.trophy-bar { display: none; align-items: center; gap: 6px; margin-bottom: 8px; }

.trophy-bar.show { display: flex; }
.trophy-input { width: 140px; padding: 6px 10px; border: 1px solid #2a2a3e; border-radius: 8px; font-size: 13px; background: #1a1a2e; color: #e8e8f0; outline: none; }
.trophy-input:focus { border-color: #5dade2; }
.trophy-btn { padding: 6px 10px; border: none; border-radius: 8px; font-size: 13px; background: #2a2a4e; color: #e8e8f0; cursor: pointer; }
.trophy-btn:active { background: #3a3a5e; }
.trophy-btn-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: transparent; color: #888; cursor: pointer; font-size: 18px; border: none; flex-shrink: 0; }
.trophy-btn-toggle:hover { color: #e8e8f0; }
/* Game detail modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.25s ease, background 0.25s ease; }
.modal-overlay.show { display: flex !important; opacity: 1; background: rgba(0,0,0,0.75); }
.modal { background: linear-gradient(145deg, #1f1f35, #18182a); border-radius: 20px; max-width: 500px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 0; position: relative; transform: translateY(30px) scale(0.95); opacity: 0; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.5); border: 3px solid #5dade2; animation: borderGlow 3s linear infinite; }
.modal-overlay.show .modal { transform: translateY(0) scale(1); opacity: 1; }
@keyframes borderGlow {
  15% { border-color: #a855f7; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(168, 85, 247, 0.25); }
  30% { border-color: #fb7299; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(251, 114, 153, 0.25); }
  45% { border-color: #fbbf24; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(251, 191, 36, 0.25); }
  60% { border-color: #34d399; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(52, 211, 153, 0.25); }
  75% { border-color: #5dade2; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(93, 173, 226, 0.25); }
  90% { border-color: #a855f7; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 15px 2px rgba(168, 85, 247, 0.25); }
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: #3a3a5e; border-radius: 4px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: rgba(0,0,0,0.4); border: none; color: #aaa; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; z-index: 3; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; backdrop-filter: blur(4px); }
.modal-close:hover { background: rgba(255,255,255,0.15); color: #fff; transform: rotate(90deg); }
.modal-img { width: 100%; height: 220px; object-fit: cover; border-radius: 20px 20px 0 0; display: block; }
.news-modal { max-width: 700px; width: 100%; max-height: 80vh; padding: 0; overflow: hidden; border-radius: 16px; background: #1a1a2e; transform: translateY(20px) scale(0.95); opacity: 0; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.show .news-modal { transform: translateY(0) scale(1); opacity: 1; }
.news-modal-content { padding: 16px 20px 20px; }
.news-modal-title { font-size: 16px; font-weight: 700; color: #e8e8f0; margin-bottom: 10px; }
.news-modal-text { font-size: 13px; color: #ccc; line-height: 1.7; max-height: 55vh; overflow-y: auto; white-space: pre-wrap; }
.news-modal-link { display: inline-block; margin-top: 12px; padding: 8px 16px; background: #2a2a4e; color: #5dade2; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; transition: background 0.2s; }
.news-modal-link:hover { background: #3a3a5e; }
.modal-body { padding: 18px 22px 22px; }
.modal-body > * { opacity: 0; transform: translateY(12px); animation: modalFadeIn 0.4s ease forwards; }
.modal-body > *:nth-child(1) { animation-delay: 0.05s; }
.modal-body > *:nth-child(2) { animation-delay: 0.10s; }
.modal-body > *:nth-child(3) { animation-delay: 0.15s; }
.modal-body > *:nth-child(4) { animation-delay: 0.20s; }
.modal-body > *:nth-child(5) { animation-delay: 0.25s; }
.modal-body > *:nth-child(6) { animation-delay: 0.30s; }
.modal-body > *:nth-child(7) { animation-delay: 0.35s; }
@keyframes modalFadeIn { to { opacity: 1; transform: translateY(0); } }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-price { font-size: 16px; color: #5dade2; font-weight: 600; margin-bottom: 10px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.modal-tag { display: inline-block; padding: 3px 10px; background: #2a2a4e; border-radius: 6px; font-size: 12px; color: #b0b0d0; white-space: nowrap; transition: all 0.2s ease; cursor: default; }
.modal-tag:hover { background: #3d3d6a; color: #e0e0f0; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(90, 173, 226, 0.15); }
.modal-rating { font-size: 14px; color: #ffb347; margin-bottom: 12px; padding: 8px 12px; background: linear-gradient(135deg, #1a1a2e, #1f1f35); border-radius: 8px; border-left: 3px solid #ffb347; transition: border-left-width 0.2s ease; }
.modal-desc { font-size: 14px; color: #ccc; line-height: 1.7; margin-bottom: 16px; padding: 10px 14px; background: #16162a; border-radius: 10px; border: 1px solid rgba(255,255,255,0.04); }
.modal-bilibili { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; background: linear-gradient(135deg, #fb7299, #fc8fa7); color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.25s ease; }
.modal-bilibili:hover { background: linear-gradient(135deg, #fc8fab, #ff9db8); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(251, 114, 153, 0.3); }
</style>
<style>
.goog-te-gadget-simple {
    background: #1a1a2e !important;
    border: 1px solid #34d399 !important;
    border-radius: 20px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
}
.goog-te-gadget-simple .goog-te-menu-value {
    color: #e8e8f0 !important;
}
.goog-te-gadget-simple .goog-te-menu-value span {
    color: #34d399 !important;
}
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0 !important;
}

