:root { --bg-color: #12121c; --card-bg: #1e1e2f; --text-main: #ffffff; --text-sub: #8b8b99; --accent-green: #00f2fe; --accent-pink: #ff0844; --accent-purple: #89216b; --accent-blue: #005bea; --accent-orange: #f39c12; --offline-gray: #444455; }

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-main); margin: 0; padding: calc(20px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left)); display: flex; justify-content: center; box-sizing: border-box; overflow-x: hidden; }

.dashboard { width: 100%; max-width: 1000px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background-color: var(--card-bg); border-radius: 12px; padding: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; transition: all 0.3s ease; min-width: 0; }
.card.full-width { grid-column: 1 / -1; }
.card-header { font-size: 14px; color: var(--text-sub); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.update-time { font-size: 12px; background: rgba(255, 255, 255, 0.05); padding: 4px 8px; border-radius: 4px; color: var(--text-sub); transition: all 0.3s ease; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background-color: #555; transition: all 0.3s ease; }
.status-dot.active { background-color: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.status-dot.afk { background-color: var(--accent-orange); }
.status-dot.playing { background-color: var(--accent-pink); box-shadow: 0 0 10px var(--accent-pink); }

.status-main { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 0; flex: 1; min-height: 100px; transition: all 0.4s ease; width: 100%; box-sizing: border-box; }
.status-main.has-cover { flex-direction: row; align-items: center; justify-content: center; gap: 24px; padding: 0 10px; }

.app-title { font-size: 32px; font-weight: bold; margin: 10px 0; color: #fff; transition: color 0.3s ease; white-space: normal; overflow-wrap: break-word; line-height: 1.2; }
.app-duration { color: var(--accent-green); font-size: 16px; font-weight: bold; margin-top: 15px; transition: color 0.3s ease; }
.app-category-badge { display: inline-block; margin-top: 5px; padding: 4px 14px; border-radius: 20px; background: rgba(0, 242, 254, 0.1); color: var(--accent-green); font-size: 14px; font-weight: 600; border: 1px solid rgba(0, 242, 254, 0.3); letter-spacing: 0.5px; transition: all 0.3s ease; }

.music-text-container { display: flex; flex-direction: column; justify-content: center; width: 100%; transition: text-align 0.4s ease; }
.status-main.has-cover .music-text-container { text-align: left; flex: 0 1 auto; width: auto; max-width: calc(100% - 104px); }

.music-cover { width: 0; height: 0; opacity: 0; visibility: hidden; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); flex-shrink: 0; margin: 0; }
.status-main.has-cover .music-cover { width: 80px; height: 80px; opacity: 1; visibility: visible; }

.music-title { font-size: 24px; font-weight: bold; margin-bottom: 10px; color: #fff; transition: color 0.3s ease; text-align: inherit; white-space: normal; overflow-wrap: break-word; line-height: 1.3; }
.music-artist { color: var(--text-sub); font-size: 16px; transition: color 0.3s ease; text-align: inherit; white-space: normal; overflow-wrap: break-word; line-height: 1.4; }

.chart-container { width: 100%; height: 250px; transition: all 0.5s ease; }
.odo-gauges-wrapper { display: flex; justify-content: space-around; align-items: center; flex: 1; padding: 10px 0 0 0; }
.odo-gauge-box { text-align: center; width: 45%; }
.odo-label { font-size: 12px; color: var(--text-sub); letter-spacing: 2px; margin-bottom: 0px; } 
.gauge-container { width: 100%; height: 200px; transition: all 0.5s ease; }
.odo-subtext { text-align: center; font-size: 13px; color: var(--text-sub); margin-top: 5px; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.1); transition: color 0.3s ease; }

.afk-mode .app-title { color: var(--text-sub); font-style: italic; }
.offline-mode .status-dot { background-color: var(--offline-gray); box-shadow: none; }
.offline-mode .app-title, .offline-mode .music-title, .offline-mode .app-duration { color: var(--text-sub); }
.offline-mode .app-category-badge { background: rgba(139, 139, 153, 0.1); color: var(--text-sub); border-color: rgba(139, 139, 153, 0.3); }
.offline-mode .update-time { color: var(--accent-pink); background: rgba(255, 8, 68, 0.1); } 
.offline-mode .chart-container, .offline-mode .gauge-container { filter: grayscale(1) opacity(0.3); pointer-events: none; }
.offline-mode .odo-subtext { color: var(--offline-gray); }
.offline-mode .music-cover { filter: grayscale(1) opacity(0.3); box-shadow: none; }

@media screen and (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; gap: 15px; }
    .card { padding: 15px; }
    .odo-gauges-wrapper { flex-direction: column; gap: 20px; }
    .odo-gauge-box { width: 100%; }
    .app-title { font-size: 24px; }
    .music-title { font-size: 20px; }
}

@media screen and (max-width: 480px) {
    .card { padding: 15px; }
    .status-main.has-cover { gap: 16px; padding: 10px 5px; }
    .status-main.has-cover .music-cover { width: 72px; height: 72px; border-radius: 8px; }
    .status-main.has-cover .music-text-container { width: auto; max-width: calc(100% - 88px); }
    .status-main.has-cover .music-title { font-size: 20px; margin-bottom: 6px; }
    .status-main.has-cover .music-artist { font-size: 15px; }
}