game {
  --bg-dark: #0a0e27;
  --bg-card: #1a1f3a;
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --accent: #fbbf24;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --border: #334155;
  --glow: #a78bfa;
  --alert-low: #10b981;
  --alert-mid: #f59e0b;
  --alert-high: #ef4444;
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1535 100%);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

game::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l5 15h16l-13 10 5 15-13-10-13 10 5-15-13-10h16z' fill='%238b5cf620' /%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 10L60 40L90 50L60 60L50 90L40 60L10 50L40 40Z' fill='none' stroke='%236366f115' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 60px, 100px 100px;
  background-position: 0 0, 50px 50px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

game > * {
  position: relative;
  z-index: 1;
}

game article {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.2) 0%, 
    rgba(139, 92, 246, 0.15) 20%,
    rgba(167, 139, 250, 0.18) 40%,
    rgba(99, 102, 241, 0.12) 60%,
    rgba(139, 92, 246, 0.2) 80%,
    rgba(99, 102, 241, 0.15) 100%);
  background-size: 400% 400%;
  animation: gradient-flow 6s ease infinite;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

game article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 1; transform: translateX(100%); }
}

game article p {
  margin: 0 0 12px 0;
}

game article p:last-child {
  margin-bottom: 0;
}

game details.s {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 0 0 8px 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

game details.s:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

game details.s[open] {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

game details.s summary {
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
  border-bottom: 1px solid transparent;
}

game details.s[open] summary {
  border-bottom-color: var(--border);
}

game details.s summary:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
}

game details.s summary::marker {
  color: var(--accent);
}

game details.s d {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

game details.s d:hover {
  background: rgba(99, 102, 241, 0.08);
  border-left-color: var(--primary);
}

game details.s d b {
  color: var(--accent);
  font-weight: 600;
}

game details.s d.sub {
  padding-left: 24px;
  font-size: 13px;
  color: var(--text-dim);
  border-left-color: var(--border);
}

game details.focus {
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, var(--bg-card), rgba(251, 191, 36, 0.05));
  position: relative;
}

game details.focus::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent), var(--primary), var(--secondary), var(--accent));
  background-size: 300% 300%;
  border-radius: 6px;
  z-index: -1;
  opacity: 0.3;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

game details.focus summary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(139, 92, 246, 0.15));
}

game details.s d.phy {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid var(--secondary);
  padding: 8px 12px;
  margin: 2px 0;
  font-size: 13px;
}

game details.s d.think {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  border-left: 3px solid var(--glow);
  padding: 10px 12px;
  margin: 6px 0 0 0;
  font-style: italic;
  color: var(--glow);
  position: relative;
}

game details.s d.think::before {
  content: '💭';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.6;
}

game details.hyp {
  border-color: var(--secondary);
}

game details.hyp summary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
}

game details.mem {
  border-color: var(--accent);
}

game details.mem summary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
}

game details.cfg {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 8px;
}

game details.cfg summary {
  padding: 8px 10px;
  font-size: 13px;
  background: rgba(99, 102, 241, 0.1);
}

game details.cfg d {
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-dim);
}

game span.alert {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--alert-mid);
  color: #000;
}

game table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
  overflow-x: auto;
  display: block;
}

game table thead {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
}

game table th {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 2px solid var(--primary);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

game table td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

game table.ltm tbody tr:nth-child(odd) {
  background: rgba(99, 102, 241, 0.05);
}

game table.ltm tbody tr:hover {
  background: rgba(99, 102, 241, 0.12);
}

game table.stm {
  border: 2px solid var(--accent);
}

game table.stm tbody tr:nth-child(odd) {
  background: rgba(251, 191, 36, 0.05);
}

game table.stm tbody tr:hover {
  background: rgba(251, 191, 36, 0.12);
}

game table.stm th {
  border-bottom-color: var(--accent);
}

@media (max-width: 640px) {
  game {
    font-size: 13px;
  }
  
  game article {
    padding: 12px;
  }
  
  game details.s summary {
    font-size: 14px;
    padding: 9px 10px;
  }
  
  game details.s d {
    padding: 5px 10px;
  }
  
  game table {
    font-size: 12px;
  }
  
  game table th,
  game table td {
    padding: 6px 4px;
  }
}