/* ===== 打印功能控制 ===== */
@media print {
  /* 1. 基础环境清理 */
  body { background: white !important; color: black; }
  .sky-bg, .stars, .clouds, .ground, .tabs, .header, .password-gate, .fab, .toast, .modal-overlay, #player-stats, .section-header .btn { 
    display: none !important; 
  }

  /* 2. 隐藏玩家页面，仅显示激活的管理页 */
  .view { display: none !important; padding: 0 !important; }
  #view-admin.active { display: block !important; }

  /* 3. 【核心修改】隐藏管理页内的 UI 元素（添加按钮、修改密码区域等） */
  #admin-panel .section-header, 
  #admin-panel > div:first-child, /* 隐藏顶部的功能按钮栏 */
  .config-section,                /* 隐藏修改密码区域 */
  [id*="password"],               /* 进一步确保密码相关 ID 被隐藏 */
  h3, h4 {                        /* 隐藏“修改管理密码”等标题文字 */
    display: none !important; 
  }

  /* 4. 移除底部按钮和右上角状态字样 */
  .card-footer { display: none !important; }
  .card-status-badge, .card-badge, [class*="status"] { 
    display: none !important; 
  }

  /* 5. 网格布局 */
  .cards-grid { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 15px !important; 
    margin-top: 0 !important;
  }

  /* 6. 【核心修改】去除阴影并调整边框 */
  .card { 
    break-inside: avoid; 
    page-break-inside: avoid; 
    margin-bottom: 15px;
    box-shadow: none !important; /* 去除卡片外部阴影 */
  }
  .card-inner { 
    background: white !important; 
    border: 4px solid #c8a55a !important; /* 搭配 #f5e6c8 的边框色 */
    border-radius: 4px;
    box-shadow: none !important; /* 去除卡片内部容器阴影 */
    -webkit-print-color-adjust: exact; 
    print-color-adjust: exact; 
  }
}
