:root {
  --bg: #111;
  --fg: #eee;
  --disabled-accent: #2b746f;
  --accent: #66fcf1;
  --hover-accent: #5ae2e0;
  --active-accent: #358888;
  --muted: #888;
  --border: #333;
  --danger: #e74c3c;
  --card: #1f1f1f;
  --success: #2ecc71;
  --warning: #f39c12;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 600px;
  margin: auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title {
  color: var(--accent);
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--accent);
  margin-top: 0;
}

section {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
}

.section-content {
  text-align: center;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.step-icon.active {
  background: var(--accent);
  color: #000;
  animation: pulse 1.5s infinite;
}

.step-icon.done {
  background: var(--success);
  color: #fff;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(102, 252, 241, 0); }
}

.step-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Big button */
.big-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.big-btn:hover {
  background: var(--hover-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 252, 241, 0.3);
}

.big-btn:active {
  background: var(--active-accent);
  transform: translateY(0);
}

.big-btn.play-btn {
  background: var(--success);
  font-size: 1.3rem;
  padding: 1.2rem 3rem;
}

.big-btn.play-btn:hover {
  background: #27ae60;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Progress bar */
.progress-wrapper {
  margin: 1.5rem 0;
}

.progress-bar-outer {
  width: 100%;
  height: 12px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.progress-percent {
  text-align: right;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: bold;
  margin-top: 0.4rem;
}

/* Progress steps */
.progress-steps {
  text-align: left;
  margin: 1.5rem 0;
  padding: 0 1rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.step-indicator {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.step-indicator.pending {
  background: var(--border);
}

.step-indicator.active {
  background: var(--accent);
  animation: pulse-dot 1s infinite;
}

.step-indicator.done {
  background: var(--success);
}

.step-indicator.error {
  background: var(--danger);
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(102, 252, 241, 0); }
}

.step-text {
  color: var(--fg);
}

.step-detail {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: auto;
}

.status-text {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Modal */
.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
}

.modal-content {
  background-color: var(--card);
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: var(--fg);
  position: relative;
  border: 1px solid var(--danger);
}

.modal-content h2 {
  color: var(--danger);
}

.modal-content p {
  margin: 1rem 0 0 0;
  word-break: break-word;
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--danger);
  cursor: pointer;
}

/* Game canvas fullscreen */
.game {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

canvas#canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
