/* common.css - Shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #111;
  --bg2: #1e1e1e;
  --bg3: #2a2a2a;
  --text: #fff;
  --text-muted: #aaa;
  --accent: #f90;
  --accent-dark: #c70;
  --danger: #e33;
  --success: #3c3;
  --winner-bg: #f90;
  --winner-text: #000;
  --rest-opacity: 0.4;
  --combo-glow: 0 0 8px #f90a;
  --border: #444;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.4em 0.8em;
  transition: background 0.15s, opacity 0.15s;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

input, textarea, select {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.35em 0.6em;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.3em 0.6em;
  text-align: center;
}

th {
  background: var(--bg3);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  font-weight: 700;
}
.btn-danger:hover:not(:disabled) { background: #c00; }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: #3a3a3a; }

.btn-success {
  background: #2a7a2a;
  color: #fff;
  font-weight: 700;
}
.btn-success:hover:not(:disabled) { background: #1e5a1e; }

.tag-winner {
  background: var(--accent);
  color: #000;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-rest {
  background: #555;
  color: #ccc;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.75rem;
}

.tag-h {
  background: #669;
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
