/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 50px auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
}

/* Form styles */
.input-form {
  margin-bottom: 40px;
}

#input-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select,
button {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

select {
  background-color: white;
  cursor: pointer;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  flex: 1;
  padding-right: 40px; /* 単位表示のためのスペース */
}

.currency-symbol {
  position: absolute;
  right: 15px;
  color: #7f8c8d;
  pointer-events: none; /* 入力の邪魔にならないように */
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: bold;
}

button:hover {
  background-color: #2980b9;
}

button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

/* Highest bids display */
.highest-bids-container {
  margin-top: 40px;
  background: #f9f9f9;
  border-radius: 6px;
  padding: 20px;
}

.highest-bids-container h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
  text-align: center;
}

.highest-bids-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highest-bid-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.item-type {
  font-weight: bold;
  color: #3498db;
  font-size: 18px;
}

.highest-bid {
  font-weight: bold;
  color: #e74c3c;
  font-size: 18px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 20px;
  color: #95a5a6;
  font-size: 16px;
}

.cf-turnstile {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

/* ローディング中のスタイル */
.cf-turnstile[data-state="loading"] {
  opacity: 0.7;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

.modal-content h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 24px;
  text-align: center;
}

#confirm-details {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

#confirm-details p {
  margin: 10px 0;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#confirm-details strong {
  color: #2c3e50;
  min-width: 120px;
}

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

.btn-primary,
.btn-secondary {
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 600px) {
  .container {
    margin: 20px;
    padding: 15px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  input,
  select,
  button {
    font-size: 14px;
    padding: 10px;
  }

  .highest-bid-item {
    padding: 12px;
  }

  .item-type,
  .highest-bid {
    font-size: 16px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-content h2 {
    font-size: 20px;
  }

  #confirm-details p {
    flex-direction: column;
    align-items: flex-start;
  }

  #confirm-details strong {
    margin-bottom: 5px;
  }

  .modal-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
