/**
 * 极简桌游极客风 - 核心全局样式
 */

:root {
  --bg-dark: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #334155;
  --border-color: #334155;
  --border-glow: #38BDF8;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --accent-cyan: #38BDF8;
  --accent-gold: #F59E0B;
  --accent-green: #10B981;
  --accent-purple: #A855F7;
  
  /* 精灵球标准色 */
  --c-fire: #EF4444;
  --c-water: #3B82F6;
  --c-grass: #334155;
  --c-electric: #F59E0B;
  --c-psychic: #EC4899;
  --c-wild: #A855F7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

/* 顶栏 Header Navigation */
.app-header {
  height: 64px;
  background-color: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-title .brand-logo {
  font-size: 1.5rem;
}

.brand-title span {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #0F172A;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 按钮通用规整样式 */
.btn-action-tool {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-bilibili {
  background: rgba(251, 114, 153, 0.15);
  border-color: #FB7299;
  color: #FB7299;
}

.btn-bilibili:hover {
  background: #FB7299;
  color: #FFF;
  box-shadow: 0 0 12px rgba(251, 114, 153, 0.4);
}

.btn-action-tool:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-action-tool.sound-off {
  color: var(--text-muted);
  opacity: 0.7;
}

/* 主容器 */
.app-container {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* Modal 遮罩与卡片 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  color: var(--accent-cyan);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.btn-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cheat-section h4 {
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.cheat-table th, .cheat-table td {
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
}

.cheat-table th {
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-muted);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.action-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
}

.action-card h5 {
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.action-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cheat-list {
  padding-left: 20px;
  line-height: 1.6;
  font-size: 0.9rem;
}
