* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.app {
  max-width: 1050px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
}

.panel {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.hidden {
  display: none;
}

.controls,
.buttonRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

select,
button {
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 10px;
}

select {
  border: 2px solid #d1d5db;
  background: white;
}

button {
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.clock {
  width: 560px;
  height: 560px;
  max-width: 90vw;
  max-height: 90vw;
  margin: 24px auto;
  border-radius: 50%;
  position: relative;
  background: #f9fafb;
  border: 3px solid #d1d5db;
}

.card {
  width: 70px;
  height: 96px;
  border-radius: 10px;
  border: 2px solid #1f2937;
  background: white;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transform: translate(-50%, -50%);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.red-card {
  color: #dc2626;
}

.black-card {
  color: #111827;
}

.card.selected {
  background: #fef3c7;
  border-color: #f59e0b;
}

.card.current {
  background: #dbeafe;
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
}

.card.finish {
  background: #dcfce7;
  border-color: #16a34a;
}

.card.original {
  background: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.2);
}

.card.predicted {
  background: #ede9fe;
  border-color: #7c3aed;
  box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.2);
}

.positionLabel {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 11px;
  color: #6b7280;
}

.summary {
  margin-top: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.mathBox {
  margin-top: 16px;
  background: #f9fafb;
  border: 2px dashed #9ca3af;
  border-radius: 14px;
  padding: 16px;
}

@media (max-width: 700px) {
  .clock {
    width: 420px;
    height: 420px;
  }

  .card {
    width: 54px;
    height: 74px;
    font-size: 16px;
  }
}
