/* ===== 基本スタイル ===== */
body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #fdfbfb, #ebedee);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background 0.5s ease;
}

.container {
  background: white;
  padding: 40px;
  width: 320px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color: #333;
}

h1 {
  margin-bottom: 10px;
  font-size: 22px;
  color: #333;
}

/* ===== 猫の画像エリア ===== */
.cat-container {
  width: 200px;
  height: 200px;
  margin: 10px auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-radius: 0;
  border-bottom: none;
}

#catImage {
  width: 180px;
  height: auto;
  max-height: 180px;
  transition: all 0.5s ease;
  object-fit: contain;
}

/* ===== 時刻・タイマー表示 ===== */
.current-time {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

.timer-display {
  font-size: 48px;
  font-weight: bold;
  margin: 20px 0;
  color: #333;
}

.mode-display {
  margin-bottom: 20px;
  font-weight: 500;
  color: #ff6b6b;
  font-size: 18px;
}

/* ===== ボタン ===== */
.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

button {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s ease;
  font-size: 14px;
}

#startBtn {
  background-color: #4CAF50;
  color: white;
}

#pauseBtn {
  background-color: #2196F3;
  color: white;
}

#resetBtn {
  background-color: #f44336;
  color: white;
}

#settingBtn {
  background-color: #ddd;
  color: #333;
}

button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

button:active {
  transform: scale(0.95);
}

/* ===== セッション情報 ===== */
.session-info {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

.session-info p {
  margin: 5px 0;
}

/* ===== モーダル ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-content h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: #333;
}

.modal-content label {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 14px;
  color: #555;
  gap: 5px;
}

.modal-content input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

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

.modal-buttons button {
  padding: 8px 16px;
}

/* ===== モード別背景色 ===== */
body.work {
  background: linear-gradient(135deg, #1a75ff, #4da3ff);
}

body.break {
  background: linear-gradient(135deg, #2d6a4f, #52b788);
}

body.work,
body.break {
  color: white;
}

body.work .container,
body.break .container {
  color: #333;
}

.history-item {
  background: #f5f5f5;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
}

.stats-btn {
  display: inline-block;
  padding: 10px 16px;
  background: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 20px;
}

.history-item {
  background: white;
  padding: 15px;
  margin: 12px 0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: left;
}

.history-item strong {
  font-size: 16px;
}

.history-item p {
  font-size: 20px;
  font-weight: bold;
  margin: 5px 0 0;
}

.back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  background: #555;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}

.total-time {
  margin-top: 25px;
  padding: 20px;
  background: #ffeaa7;
  border-radius: 14px;
  text-align: center;
  font-weight: bold;
}

.total-time p {
  font-size: 24px;
  margin: 10px 0 0;
}
