:root {
  --theme-color: #1c1a99;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#pomodoro-container {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  flex: 1;
}

#pomodoro-header {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--theme-color);
}

/* Timer Settings */
.timer-settings {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.setting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.setting label {
  font-size: 13px;
  color: #666;
  font-weight: bold;
}

.setting input {
  width: 70px;
  padding: 6px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.setting input:focus {
  outline: none;
  border-color: var(--theme-color);
}

/* Timer Display */
.timer-display {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: #e6e6e6;
  stroke-width: 8;
}

.progress-ring-circle {
  fill: none;
  stroke: var(--theme-color);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.timer-text {
  position: absolute;
  text-align: center;
}

#timer-mode {
  font-size: 18px;
  font-weight: bold;
  color: var(--theme-color);
  margin-bottom: 4px;
}

#timer-countdown {
  font-size: 48px;
  font-weight: bold;
  color: #333;
  font-variant-numeric: tabular-nums;
}

/* Timer Controls */
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.timer-controls button {
  padding: 10px 24px;
  font-size: 16px;
  background-color: var(--theme-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.timer-controls button:hover {
  background-color: #0d0c5f;
}

/* Session History */
#session-history {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-header h3 {
  margin: 0;
  color: var(--theme-color);
  font-size: 16px;
}

.clear-history-btn {
  padding: 4px 10px;
  font-size: 12px;
  background-color: #aa0000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.clear-history-btn:hover {
  background-color: #880000;
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 6px;
  background-color: #f9f9f9;
  border-radius: 4px;
  font-size: 14px;
}

.session-type {
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  color: #fff;
}

.session-type.work {
  background-color: var(--theme-color);
}

.session-type.break {
  background-color: #45a049;
}

.session-info {
  color: #666;
  font-size: 13px;
}

.empty-message {
  text-align: center;
  color: #999;
  padding: 10px;
}

/* Toast */
#toast {
  position: fixed;
  top: 40px;
  right: 40px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#theme-color-picker {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 10px 0;
  background-color: var(--theme-color);
  color: #fff;
  font-size: 14px;
  margin-top: auto;
}

.footer a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.footer a:hover {
  text-decoration: underline;
}

a.external::after {
  content: "\2197";
  margin-left: 4px;
}

@media screen and (max-width: 768px) {
  #pomodoro-container {
    margin: 30px 10px;
    padding: 15px;
  }

  #pomodoro-header {
    font-size: 20px;
  }
}

@media screen and (max-width: 480px) {
  #pomodoro-container {
    margin: 20px 5px;
    padding: 10px;
  }

  #pomodoro-header {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .timer-settings {
    gap: 12px;
  }

  .setting input {
    width: 60px;
    font-size: 14px;
  }

  .timer-display {
    margin: 10px 0;
  }

  .progress-ring {
    width: 200px;
    height: 200px;
  }

  #timer-countdown {
    font-size: 36px;
  }

  #timer-mode {
    font-size: 15px;
  }

  .timer-controls {
    gap: 8px;
    margin-bottom: 20px;
  }

  .timer-controls button {
    padding: 10px 18px;
    font-size: 14px;
  }

  .session-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .session-info {
    font-size: 12px;
  }

  #toast {
    right: 10px;
    top: 10px;
    font-size: 13px;
  }

  .footer {
    font-size: 12px;
    padding: 8px 10px;
  }
}
