:root { --primary-color: #4361ee; --primary-hover: #3a56d4; --text-color: #2b2d42; --bg-color: #f8f9fa; --card-bg: #ffffff; --border-color: #e9ecef; --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); --hover-bg: #f1f3f5; --even-row: #f8f9fa; --transition: all 0.3s ease; --status-card-bg: #ffffff; --status-card-text: #2b2d42; --primary-color-c: #3252df; --warning-text-color: #ff0800; } [data-theme="dark"] { --primary-color: #3252df; --primary-hover: #2360cf; --text-color: #f8f9fa; --bg-color: #121212; --card-bg: #1e1e1e; --border-color: #333; --shadow: 0 4px 20px rgba(0, 0, 0, 0.3); --hover-bg: #2d2d2d; --even-row: #252525; --status-card-bg: #252525; --status-card-text: #f8f9fa; --primary-color-c: #5878fa; --warning-text-color: #ff423c; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; margin: 0; padding: 0; background-color: var(--bg-color); color: var(--text-color); transition: var(--transition); min-height: 100vh; } .container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; } h1 { color: var(--primary-color-c); margin: 0; font-size: 2rem; font-weight: 600; } .controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; } .info-note { margin: 0; color: var(--text-color); opacity: 0.8; font-size: 0.9rem; } button { transition: var(--transition); cursor: pointer; border: none; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; } .refresh-btn { background-color: var(--primary-color); color: white; padding: 0.75rem 1.25rem; font-size: 1rem; } .refresh-btn:hover { background-color: var(--primary-hover); transform: translateY(-1px); } .refresh-btn:active { transform: translateY(0); } .refresh-btn i { transition: transform 0.5s ease; } .refresh-btn.loading i { transform: rotate(360deg); } .theme-toggle { background: transparent; color: var(--text-color); font-size: 1.25rem; padding: 0.5rem; position: relative; width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .theme-toggle:hover { background-color: var(--hover-bg); } .theme-toggle i { position: absolute; transition: opacity 0.3s ease, transform 0.3s ease; } .theme-toggle .fa-moon { opacity: 0; transform: scale(0.8); } [data-theme="dark"] .theme-toggle .fa-moon { opacity: 1; transform: scale(1); } [data-theme="dark"] .theme-toggle .fa-sun { opacity: 0; transform: scale(0.8); } .stats-container { background-color: var(--card-bg); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); } table { width: 100%; border-collapse: collapse; } th, td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); transition: var(--transition); } th { background-color: var(--primary-color); color: white; font-weight: 500; } tr { transition: var(--transition); } tr:hover { background-color: var(--hover-bg); } tr:nth-child(even) { background-color: var(--even-row); } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } tbody tr { animation: fadeIn 0.3s ease forwards; opacity: 0; } tbody tr:nth-child(1) { animation-delay: 0.05s; } tbody tr:nth-child(2) { animation-delay: 0.1s; } tbody tr:nth-child(3) { animation-delay: 0.15s; } tbody tr:nth-child(4) { animation-delay: 0.2s; } tbody tr:nth-child(5) { animation-delay: 0.25s; } tbody tr:nth-child(6) { animation-delay: 0.3s; } tbody tr:nth-child(7) { animation-delay: 0.35s; } tbody tr:nth-child(8) { animation-delay: 0.4s; } tbody tr:nth-child(9) { animation-delay: 0.45s; } tbody tr:nth-child(10) { animation-delay: 0.5s; } @media (max-width: 768px) { .container { padding: 1.5rem 1rem; } th, td { padding: 0.75rem 1rem; } table { display: block; overflow-x: auto; } } .status-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; } .status-card { background-color: var(--status-card-bg); color: var(--status-card-text); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow); transition: var(--transition); } .status-card h3 { margin-top: 0; margin-bottom: 1rem; color: var(--primary-color-c); font-size: 1.1rem; } .online-count { font-size: 2rem; font-weight: 600; color: var(--status-card-text); } .online-players, .top-players { list-style: none; padding: 0; margin: 0; } .online-players li, .top-players li { padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; } .online-players li:last-child, .top-players li:last-child { border-bottom: none; } .player-name { font-weight: 500; } .player-time { color: var(--primary-color-c); opacity: 0.8; } .warning { color: var(--warning-text-color); margin: 0; } @media (max-width: 600px) and (orientation: portrait) { .container { padding: 1rem 0.75rem; } h1 { font-size: 1.5rem; } .header { flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; } .status-cards { grid-template-columns: 1fr; gap: 1rem; } .status-card { padding: 1rem; } .online-count { font-size: 1.75rem; } table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } th, td { padding: 0.5rem; font-size: 0.85rem; white-space: nowrap; } .controls { flex-direction: column; align-items: flex-start; } .refresh-btn { width: 100%; justify-content: center; padding: 0.5rem; } .warning { font-size: 0.85rem; margin-bottom: 0.5rem; } th:nth-child(1), td:nth-child(1) { min-width: 100px; } th:nth-child(2), td:nth-child(2), th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { min-width: 80px; } } @media (max-width: 400px) { .container { padding: 1rem 0.5rem; } h1 { font-size: 1.3rem; } .status-card h3 { font-size: 1rem; } .player-name, .player-time { font-size: 0.9rem; } } .loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; display: none; } .loading-overlay.active { display: flex; } .loading-spinner { width: 50px; height: 50px; border: 5px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: var(--primary-color); animation: spin 1s ease-in-out infinite; } @keyframes spin { to { transform: rotate(360deg); } } .license-footer { margin-top: 3rem; padding: 1.5rem 0; text-align: center; color: var(--text-color); opacity: 0.8; font-size: 0.85rem; border-top: 1px solid var(--border-color); } .license-footer a { color: var(--primary-color-c); text-decoration: none; } .license-footer a:hover { text-decoration: underline; } @media (max-width: 768px) { .license-footer { margin-top: 2rem; padding: 1rem 0; font-size: 0.8rem; } } .player-counts { display: flex; flex-direction: column; gap: 8px; } .count-item { display: flex; justify-content: space-between; } .count-label { font-weight: 500; } .count-value { color: var(--primary-color-c); } .player-lists { display: flex; gap: 20px; } .player-list { flex: 1; } .player-list h4 { margin-bottom: 8px; color: var(--primary-color-c); } .status-section { margin: 2rem 0; } .status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 1rem; } @media (max-width: 768px) { .status-grid { grid-template-columns: 1fr; } .player-lists { flex-direction: column; } } .status-item { background: var(--card-bg); padding: 1rem; border-radius: 8px; box-shadow: var(--shadow); } .status-item h3 { margin-top: 0; color: var(--primary-color-c); } .memory-stats, .performance-stats { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .memory-stats div, .performance-stats div { font-size: 0.9rem; } canvas { max-height: 300px; width: 100% !important; } .error-message { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #ff4444; color: white; padding: 10px 20px; border-radius: 5px; opacity: 0; transition: opacity 0.3s; z-index: 1000; } .error-message.show { opacity: 1; } .performance-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; } .metric { background: var(--card-bg); padding: 10px; border-radius: 8px; box-shadow: var(--shadow); } .metric-label { font-weight: bold; display: block; margin-bottom: 5px; color: var(--primary-color-c); } .metric-value { font-size: 1.5rem; font-family: monospace; } @media (max-width: 600px) { .performance-metrics { grid-template-columns: 1fr; } } .chart-container { display: flex; flex-direction: column; gap: 15px; } .chart-wrapper { position: relative; height: 300px; /* 固定高度 */ width: 100%; } .metric-display { display: flex; gap: 20px; justify-content: center; } .metric { background: var(--card-bg); padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow); min-width: 120px; text-align: center; } .metric-label { font-weight: bold; display: block; margin-bottom: 5px; color: var(--primary-color-c); font-size: 0.9rem; } .metric-value { font-size: 1.8rem; font-family: monospace; font-weight: bold; } @media (max-width: 768px) { .chart-wrapper { height: 250px; } .metric-display { flex-direction: column; gap: 10px; } .metric { padding: 10px 15px; } }