
/* モーダルスタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 25px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.3);
  text-align: center;
  min-width: 400px;
  border: 2px solid rgba(76, 175, 80, 0.3);
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #2e7d32;
  font-size: 24px;
}

#modal-level-select {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-bottom: 25px;
  border-radius: 10px;
  border: 2px solid #4caf50;
  background: white;
  color: #2e7d32;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.modal-btn {
  padding: 15px 30px;
  font-size: 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  min-width: 120px;
}

.modal-btn.primary {
  background: linear-gradient(145deg, #4caf50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-btn.primary:hover {
  background: linear-gradient(145deg, #66bb6a 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-btn.secondary {
  background: linear-gradient(145deg, #757575 0%, #616161 100%);
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-btn.secondary:hover {
  background: linear-gradient(145deg, #9e9e9e 0%, #757575 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ランキングモーダル専用スタイル */
.ranking-modal-content {
  min-width: 500px;
  max-width: 600px;
}

.ranking-section {
  margin-bottom: 25px;
}

#progress-display {
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid #4caf50;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

#progress-display h3 {
  margin: 0 0 10px 0;
  color: #2e7d32;
  font-size: 20px;
  font-weight: bold;
}

#progress-text {
  font-size: 18px;
  color: #2e7d32;
  font-weight: bold;
}

#ranking-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
}

#ranking-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 16px;
}

#ranking-list li:last-child {
  border-bottom: none;
}

.ranking-modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

#clear-ranking-btn {
  background: linear-gradient(145deg, #f44336 0%, #d32f2f 100%);
  color: white;
  font-size: 14px;
  padding: 10px 20px;
  margin: 0;
}

#clear-ranking-btn:hover {
  background: linear-gradient(145deg, #ef5350 0%, #f44336 100%);
}