:root {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #102a43;
  background-color: #f5f7fa;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header,
.page-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: #fff;
  border-bottom: 1px solid #d9e2ec;
}

.page-footer {
  border-top: 1px solid #d9e2ec;
  border-bottom: none;
  margin-top: auto;
  background-color: #fdfdfd;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 2rem;
  padding: 2rem clamp(1rem, 3vw, 4rem);
  align-items: start;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.wheel-panel {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 27, 49, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#wheelCanvas {
  max-width: min(480px, 100%);
  width: 100%;
  height: auto;
}

.controls {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 27, 49, 0.08);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.control-label {
  font-weight: 600;
}

input[type='file'] {
  border: 1px dashed #bcccdc;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
}

textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d9e2ec;
  padding: 0.75rem;
  font-family: 'Fira Code', 'SFMono-Regular', Consolas, monospace;
  resize: vertical;
  min-height: 180px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: linear-gradient(120deg, #22d1ee, #3d5af1);
  color: #fff;
  box-shadow: 0 12px 20px rgba(61, 90, 241, 0.35);
}

button.ghost {
  background: transparent;
  color: #3d5af1;
  border: 1px solid rgba(61, 90, 241, 0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(61, 90, 241, 0.45);
}

button.ghost:not(:disabled):hover {
  box-shadow: none;
  background: rgba(61, 90, 241, 0.08);
}

#selectionBanner {
  width: 100%;
  min-height: 70px;
  background: #000;
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#selectionMessage {
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 700;
  text-align: center;
}

.textarea-group {
  margin-top: 2rem;
}

.hint {
  font-size: 0.85rem;
  color: #627d98;
}

.shortcut-buttons {
  gap: 0.5rem;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
