.dashboard-page {
  padding: 2rem 0;
}

.intro-card {
  position: relative;
  background: linear-gradient(135deg, #2193b0, #6dd5ed);
  border: 4px solid #333;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  margin-bottom: 2rem;
}
.intro-card .grid {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.intro-card .intro-text {
  justify-self: center;
  text-align: center;
}
.intro-card figure {
  justify-self: start;
}
.intro-card figure img {
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.intro-card .intro-text h3 {
  margin: 0;
  color: white;
}
.intro-card .button-deco {
  justify-self: end;
  background-color: #000;
  width: auto;
  margin-left: 8rem;
  margin-top: 1rem;
}

.flow-steps {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5rem;
  order: 2; 
}
.flow-steps .step {
  width: 100px;
  height: 100px;
  padding: 6rem;
  border: 4px solid #333;
  border-radius: 1rem;
  background: #1cbfe4;
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 4px 8px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.flow-steps .step.unlocked {
  animation: bob 3s ease-in-out infinite;
}
.flow-steps .step.unlocked:hover {
  animation: pop 0.5s forwards;
  box-shadow:
    inset 0 6px 12px rgba(0, 0, 0, 0.3),
    0 6px 12px rgba(0, 0, 0, 0.2);
}
.flow-steps .step.locked {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  color: black;
}
.flow-steps .arrow {
  font-size: 4rem;
  color: #e9e9e9;
  text-align: center;
  margin: 0;
  transform: rotate(180deg);
}

.flow-container {
  display: flex;
  flex-direction: column;
}
.flow-steps.finale-step {
  order: 1;
}

.button-reset {
  background-color: #e74c3c;
  color: white;
  padding: 0.25em 0.6em;
  font-size: 0.85rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.2s;
}
.button-reset:hover {
  background-color: #c0392b;
}
.button-restart {
  background-color: #d32f2f;
  color: white;
  padding: 0.6em 1.2em;
  font-size: 0.9rem;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin-top: 1rem;
}
.button-restart:hover {
  background-color: #b71c1c;
}
.game-over-container {
  max-width: 400px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem;
  background-color: #ffebee;
  border-radius: 1rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #ef9a9a;
}
.game-over-title {
  font-size: 2rem;
  color: #c62828;
  margin-bottom: 1rem;
}
.game-over-subtitle {
  font-size: 1.2rem;
  color: #444;
  margin-bottom: 1.5rem;
}

/* Step states */
.step.pending       { background: #ffc800; cursor: not-allowed; }
.step.completed     { background: #c3f3c3; border: 2px solid #5cb85c; color: #333; }
.step.completed.clickable { background: #ffca28; }
.step.viewed.clickable    { background: #4fc3f7; }
.step.unlocked       { background: #8bc34a; }
.step.locked         { background: #e0e0e0; cursor: not-allowed; }
.step.clickable:hover{ filter: brightness(1.1); }

#reset-modal blockquote {
  border-left: 4px solid #e74c3c;
  background: #ffebee;
  margin: 1rem 0;
}

#reset-modal blockquote ul {
  margin: 0.5rem 0;
}

#reset-modal blockquote li {
  color: #c62828;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

#reset-modal blockquote footer {
  background: #c62828;
  color: white;
  padding: 0.8rem;
  border-radius: 6px;
  margin-top: 1rem;
  text-align: center;
}

#reset-modal blockquote footer cite {
  color: white;
  font-style: normal;
}

.step.finale {
  background: linear-gradient(135deg, #ff9800, #ff5722);
  font-size: 5rem;
  font-weight: bold;
}
.step.finale.locked {
  background: #ccc;
  color: #777;
  opacity: 0.7;
}

@keyframes bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}
@keyframes pop {
  0%      { transform: scale(1); }
  50%     { transform: scale(1.05); }
  100%    { transform: scale(1); }
}

@media (max-width: 600px) {
  .intro-card .grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .intro-card figure img {
    width: 80px;
    height: 80px;
    padding: 8px;
  }
  .intro-card .button-deco {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    justify-self: center;
  }
  .intro-card .intro-text,
  .intro-card figure {
    justify-self: center !important;
    margin-bottom: 0.5rem;
  }
}

/* Color-scheme fixes */
@media (prefers-color-scheme: light) {
  .flow-steps .arrow {
    color: black;
  }
}
