.roulette-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .roulette-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.canvas-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.roulette-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 2rem;
}

.pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--danger);
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  display: block;
}

.controls-action {
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
}

.btn-large {
  width: 100%;
  max-width: 300px;
  padding: 1rem 2rem;
  font-size: 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: transform 0.1s ease;
}

.btn-large:active {
  transform: scale(0.95);
}

.btn-large:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.result-display {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  min-height: 2.5rem;
  margin-top: 1rem;
}

.settings-panel {
  flex: 1;
  max-width: 100%;
}

@media (min-width: 768px) {
  .settings-panel {
    max-width: 400px;
  }
}

.input-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-form input {
  margin-bottom: 0;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.items-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.item-color {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.item-name {
  flex-grow: 1;
  font-weight: 500;
}

.item-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--bg-color);
  color: var(--danger);
  border: 1px solid var(--border-color);
}

.item-actions button:hover {
  background: #FEF2F2;
  border-color: var(--danger);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setting-row label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 当選モーダル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  max-width: 90%;
  width: 450px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 4px solid var(--primary);
}

.winner-name-display {
  font-size: 3rem;
  font-weight: 900;
  margin: 1.5rem 0;
  word-break: break-all;
  line-height: 1.2;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
  color: var(--primary);
}

@keyframes scaleUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 当選履歴 */
.history-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-color);
}

.history-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  animation: slideIn 0.3s ease-out;
}

.history-item:last-child {
  border-bottom: none;
}

.history-index {
  font-weight: bold;
  color: var(--text-muted);
  width: 2.5rem;
  font-size: 0.875rem;
}

.history-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-main);
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes slideIn {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setting-row label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}