/* Background theme */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: white;
}

/* Card container */
.wrapper {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  padding: 20px 30px;
  margin-top: 30px;
  width: 90%;
  max-width: 950px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* Title */
h1 {
  font-size: 2em;
  letter-spacing: 1px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ffecd2, #fcb69f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Controls */
.controls {
  margin-bottom: 10px;
}

.controls input {
  padding: 8px 12px;
  margin: 5px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 15px;
}

button {
  background: #00c6ff;
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  border: none;
  color: white;
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

button:hover {
  background: linear-gradient(45deg, #02a7d6, #004ddf);
}

/* Result display */
#result {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px;
  display: inline-block;
  font-weight: bold;
  color: #ffea00;
}

/* SVG area */
#dfaCanvas {
  margin-top: 20px;
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

circle.state {
  fill: #3498db;
  stroke: white;
  stroke-width: 2;
  cursor: grab;
  transition: 0.3s;
}

circle.state:hover {
  fill: #5dade2;
}

circle.accept {
  stroke: #2ecc71;
  stroke-width: 4;
}

circle.current {
  fill: #f1c40f;
}

line.transition {
  stroke: white;
  stroke-width: 2;
  marker-end: url(#arrow);
}

text {
  fill: white;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: middle;
  user-select: none;
}

.instructions {
  margin: 8px 0;
  font-size: 14px;
  color: #fff3;
}