/* 2025/06/27-17:05 */
body {
    font-family: sans-serif;
    text-align: center;
    padding: 40px;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: auto;
    background: var(--box-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 計時器容器：橫向排列，RWD */
#timers {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* 單一計時器樣式 */
.timer {
    flex: 1;
    min-width: 220px;
    max-width: 100%;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--timer-bg);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

/* 表單樣式與間距 */
.timer label {
    display: block;
    margin-top: 8px;
}

.timer input {
    margin: 5px;
    padding: 8px;
    width: 80%;
    max-width: 300px;
}

.time-left {
    font-size: 1.4em;
    margin-top: 10px;
    font-weight: bold;
}

button {
    padding: 6px 12px;
    margin-top: 10px;
}

.theme-selector {
    position: fixed;
    top: 10px;
    right: 20px;
}

/* 主題變數 */
:root {
    --box-bg: white;
    --timer-bg: #fafafa;
}

/* 白色主題（預設） */
body.white {
    background: #f0f0f0;
    color: #000;
    --box-bg: white;
    --timer-bg: #fafafa;
}

/* 黑色主題 */
body.black {
    background: #222;
    color: #eee;
    --box-bg: #333;
    --timer-bg: #444;
}

/* 粉紅主題 */
body.pink {
    background: #ffe6f0;
    color: #880044;
    --box-bg: #fff0f5;
    --timer-bg: #ffd6e8;
}

/* 水藍主題 */
body.blue {
    background: #e6f7ff;
    color: #004466;
    --box-bg: #f0fbff;
    --timer-bg: #ccf0ff;
}

/* RWD - 平板以下：直式排列 */
@media screen and (max-width: 768px) {
  .container {
    padding: 15px;
  }

  #timers {
    flex-direction: column;
    gap: 15px;
  }

  .timer {
    width: 100%;
  }

  .timer input {
    width: 100%;
    box-sizing: border-box;
  }

  .theme-selector {
    position: static;
    margin-bottom: 10px;
  }

  h1 {
    font-size: 1.5em;
  }
}

/* RWD - 手機小螢幕 */
@media screen and (max-width: 480px) {
  .timer {
    padding: 10px;
  }

  button {
    width: 100%;
  }
}
