* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #c7d2fe 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 40px;
  width: 100%;
  max-width: 480px;
}

h1 {
  font-size: 32px;
  font-weight: bold;
  color: #1f2937;
  text-align: center;
  margin-bottom: 32px;
}

.input-group {
  margin-bottom: 32px;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.input-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.input-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-value {
  font-size: 24px;
  font-weight: bold;
  color: #6366f1;
}

.number-input {
  width: 80px;
  padding: 6px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  outline: none;
  transition: all 0.2s;
}

.number-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.number-input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  background: #e5e7eb;
  -webkit-appearance: none;
  appearance: none;
}

/* Webkit (Chrome, Safari, Edge) のトラック */
input[type="range"]::-webkit-slider-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 8px;
  border: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: -8px;
}

/* Firefox のトラック */
input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 8px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="range"]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

input[type="range"]:disabled::-moz-range-thumb {
  cursor: not-allowed;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.display {
  background: linear-gradient(135deg, #6366f1 0%, #9333ea 100%);
  border-radius: 16px;
  padding: 32px;
  color: white;
  margin-bottom: 24px;
}

.time-display {
  text-align: center;
  font-size: 48px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  margin-bottom: 24px;
}

.cost-display {
  text-align: center;
}

.cost-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.cost-value {
  font-size: 40px;
  font-weight: bold;
}

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

button {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
}

.btn-start {
  background: #22c55e;
  color: white;
}

.btn-start:hover {
  background: #16a34a;
}

.btn-pause {
  background: #eab308;
  color: white;
}

.btn-pause:hover {
  background: #ca8a04;
}

.btn-reset {
  background: #ef4444;
  color: white;
}

.btn-reset:hover {
  background: #dc2626;
}

.info {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  color: #4b5563;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-value {
  font-weight: 600;
}

.icon {
  width: 24px;
  height: 24px;
}

.share-container {
  margin-top: 16px;
  text-align: center;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-share:hover {
  background: #e5e7eb;
  color: #374151;
}

.btn-share .icon {
  width: 16px;
  height: 16px;
}

.share-message {
  margin-top: 8px;
  font-size: 12px;
  color: #10b981;
  opacity: 0;
  transition: opacity 0.3s;
}

.share-message.show {
  opacity: 1;
}
