*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;background:#f5f7fa;color:#333;font-size:14px}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font-family:inherit}
input,textarea,select{font-family:inherit;font-size:14px}

/* 登录页 */
.login-body{height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#e8f5e9,#c8e6c9);position:relative}
.login-body::before{content:'';position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2334c759' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")}
.login-box{width:420px;background:#fff;border-radius:16px;padding:48px 40px;box-shadow:0 8px 32px rgba(0,0,0,.08);position:relative;z-index:1}
.login-logo{text-align:center;margin-bottom:32px}
.login-logo .icon{width:64px;height:64px;background:linear-gradient(135deg,#34c759,#2dae4f);border-radius:16px;display:inline-flex;align-items:center;justify-content:center;font-size:32px;color:#fff;margin-bottom:12px}
.login-logo h1{font-size:24px;color:#1a1a1a;margin-bottom:4px}
.login-logo p{color:#999;font-size:14px}
.form-group{margin-bottom:20px}
.form-label{display:block;margin-bottom:6px;font-weight:500;color:#555}
.form-input{width:100%;height:44px;padding:0 16px;border:1px solid #e0e0e0;border-radius:8px;outline:none;transition:border-color .2s}
.form-input:focus{border-color:#34c759}
.btn-primary{width:100%;height:44px;background:linear-gradient(135deg,#34c759,#2dae4f);color:#fff;border:none;border-radius:8px;font-size:16px;font-weight:500;transition:all .2s}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(52,199,89,.3)}
.btn-sm{padding:6px 16px;border-radius:6px;font-size:13px}
.btn-green{background:#34c759;color:#fff;border:none}
.btn-blue{background:#2196f3;color:#fff;border:none}
.btn-orange{background:#ff6b35;color:#fff;border:none}
.btn-red{background:#f44336;color:#fff;border:none}
.btn-gray{background:#f0f0f0;color:#666;border:1px solid #e0e0e0}

/* 主框架 */
.layout{display:flex;height:100vh}
.sidebar{width:220px;background:#1a1a2e;color:#fff;display:flex;flex-direction:column;flex-shrink:0}
.sidebar-header{padding:20px;display:flex;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.1)}
.sidebar-header .logo-icon{width:36px;height:36px;background:linear-gradient(135deg,#34c759,#2dae4f);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px}
.sidebar-header .logo-text{font-size:16px;font-weight:600}
.sidebar-nav{flex:1;padding:12px 0;overflow-y:auto}
.nav-item{display:flex;align-items:center;gap:12px;padding:12px 20px;cursor:pointer;transition:all .2s;color:rgba(255,255,255,.7);border-left:3px solid transparent}
.nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.nav-item.active{background:rgba(52,199,89,.15);color:#34c759;border-left-color:#34c759}
.nav-item .icon{font-size:18px;width:24px;text-align:center}
.nav-item .text{font-size:14px}
.sidebar-footer{padding:16px 20px;border-top:1px solid rgba(255,255,255,.1);font-size:12px;color:rgba(255,255,255,.4)}
.main{flex:1;display:flex;flex-direction:column;overflow:hidden}
.topbar{height:56px;background:#fff;border-bottom:1px solid #eee;display:flex;align-items:center;justify-content:space-between;padding:0 24px;flex-shrink:0}
.topbar-left{display:flex;align-items:center;gap:8px;color:#666}
.topbar-right{display:flex;align-items:center;gap:16px}
.user-info{display:flex;align-items:center;gap:8px;cursor:pointer;padding:4px 12px;border-radius:8px;transition:background .2s}
.user-info:hover{background:#f5f5f5}
.user-avatar{width:32px;height:32px;background:linear-gradient(135deg,#34c759,#2dae4f);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:600}
.content{flex:1;overflow-y:auto;padding:24px}

/* 卡片 */
.card{background:#fff;border-radius:12px;padding:24px;margin-bottom:20px;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.card-title{font-size:18px;font-weight:600;margin-bottom:16px;display:flex;align-items:center;justify-content:space-between}
.card-subtitle{font-size:12px;color:#999;font-weight:400}

/* 搜索栏 */
.search-bar{display:flex;gap:10px;margin-bottom:20px}
.search-input{flex:1;height:40px;padding:0 16px;border:1px solid #e0e0e0;border-radius:8px;outline:none}
.search-input:focus{border-color:#34c759}

/* 表格 */
.data-table{width:100%;border-collapse:collapse}
.data-table th{background:#f8f9fa;padding:12px 16px;text-align:left;font-weight:600;color:#666;font-size:13px;border-bottom:2px solid #e0e0e0;white-space:nowrap}
.data-table td{padding:12px 16px;border-bottom:1px solid #f0f0f0;color:#333}
.data-table tr:hover td{background:#fafbfc}
.tag{display:inline-flex;padding:3px 10px;border-radius:6px;font-size:12px;font-weight:500}
.tag-yellow{background:#fff8e1;color:#f9a825}
.tag-green{background:#e8f5e9;color:#2e7d32}
.tag-blue{background:#e3f2fd;color:#1565c0}
.tag-red{background:#ffebee;color:#c62828}
.tag-gray{background:#f5f5f5;color:#888}
.overdue{background:#ffebee;color:#c62828;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:500}

/* 表单布局 */
.form-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}
.form-row-2{grid-template-columns:repeat(2,1fr)}
.form-row-4{grid-template-columns:repeat(4,1fr)}
.section-title{font-size:16px;font-weight:600;margin:24px 0 16px;padding-bottom:8px;border-bottom:2px solid #e8f5e9;color:#333}
.radio-group{display:flex;gap:12px;flex-wrap:wrap}
.radio-box{padding:8px 16px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:8px;cursor:pointer;font-size:13px;transition:all .2s}
.radio-box.active{background:#e8f5e9;border-color:#34c759;color:#2e7d32;font-weight:500}
.check-group{display:flex;flex-wrap:wrap;gap:8px}
.check-box{padding:6px 12px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:8px;cursor:pointer;font-size:13px;transition:all .2s}
.check-box.active{background:#e8f5e9;border-color:#34c759;color:#2e7d32;font-weight:500}

/* 游戏卡片 */
.game-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
.game-card{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.06);cursor:pointer;transition:all .2s;border:2px solid transparent}
.game-card:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.1)}
.game-card.free{border-color:#34c759}
.game-card-hero{height:120px;display:flex;align-items:center;justify-content:center;font-size:48px;color:#fff;position:relative}
.game-card-body{padding:16px}
.game-card-name{font-size:15px;font-weight:600;margin-bottom:4px}
.game-card-desc{font-size:12px;color:#999;margin-bottom:10px}
.game-card-meta{display:flex;gap:8px}
.badge{font-size:11px;padding:2px 8px;border-radius:4px}
.badge-free{background:#e8f5e9;color:#2e7d32}
.badge-vip{background:#fff3e0;color:#e65100}

/* 统计 */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:24px}
.stat-card{background:#fff;border-radius:12px;padding:20px;box-shadow:0 1px 4px rgba(0,0,0,.04);text-align:center}
.stat-value{font-size:32px;font-weight:700;color:#34c759}
.stat-label{font-size:13px;color:#999;margin-top:4px}

/* 趋势图容器 */
.chart-container{height:260px;background:#fafbfc;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-top:12px}

/* 弹窗 */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:1000;display:none;align-items:center;justify-content:center}
.modal-overlay.active{display:flex}
.modal-box{background:#fff;border-radius:12px;width:90%;max-width:800px;max-height:90vh;display:flex;flex-direction:column}
.modal-header{padding:16px 24px;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center}
.modal-title{font-size:16px;font-weight:600}
.modal-close{cursor:pointer;font-size:20px;color:#999;padding:4px}
.modal-body{padding:24px;overflow-y:auto;flex:1}
.modal-footer{padding:16px 24px;border-top:1px solid #f0f0f0;display:flex;justify-content:flex-end;gap:10px}

/* 详情页 */
.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#f0f0f0;border-radius:8px;overflow:hidden}
.detail-item{background:#fff;padding:14px 16px}
.detail-label{font-size:11px;color:#999;margin-bottom:4px;text-transform:uppercase}
.detail-value{font-size:14px;font-weight:500;color:#333}
.detail-value.warn{color:#e65100;font-weight:700}

/* 训练页面 */
.game-canvas-container{display:flex;align-items:center;justify-content:center;min-height:500px;background:#fafbfc;border-radius:12px;position:relative}
.game-info-bar{display:flex;justify-content:center;gap:40px;margin-bottom:16px;padding:12px;background:#f0f4f1;border-radius:8px}
.game-info-item{text-align:center}
.game-info-label{font-size:11px;color:#999}
.game-info-value{font-size:20px;font-weight:700;color:#333}

/* 隐藏 */
.hidden{display:none !important}

/* 响应式 */
@media (max-width:1200px){.form-row{grid-template-columns:repeat(2,1fr)}}
@media (max-width:768px){
  .sidebar{width:60px}
  .sidebar-header .logo-text,.nav-item .text{display:none}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .form-row{grid-template-columns:1fr}
}
