/* 余白などの初期化 */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: #fff; color: #111; }

/* 全体：左 240px + 右 可変 */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* 左サイドバー（固定してスクロールしても残す） */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px;
  border-right: 1px solid #e5e5e5;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  padding: 8px 10px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.menu-item:hover { background: #f3f3f3; }
.menu-item.is-active { background: #111; color: #fff; }

.sidebar-footer { margin-top: auto; opacity: 0.6; }

/* 右側 */
.main {
  min-width: 0; /* 横はみ出し対策 */
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 20px;
  background-color: #fff;
}

h1 {
  margin-bottom: 30px;
}

.container {
  display: flex; /* 横並びに配置 */
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}

.timer-box {
  border: 2px solid #333;
  padding: 20px;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.1);
  width: 220px;
}

.time-display {
  font-size: 2.2em;
  margin: 15px 0;
  font-weight: bold;
  padding: 5px;
  border: 2px dashed #d9534f;
  border-radius: 5px;
  background-color: #fff;
  min-width: 100px;
}

button {
  margin: 5px;
  padding: 10px;
  font-size: 1em;
  cursor: pointer;
  width: 100px;
  border: none;
  border-radius: 5px;
  color: #fff;
  transition: 0.3s;
}

/* 開始ボタン（赤色） */
.start-btn {
  background-color: #dc3545;
}
.start-btn:hover {
  background-color: #c82333;
}

/* 停止ボタン（青色） */
.stop-btn {
  background-color: #007bff;
}
.stop-btn:hover {
  background-color: #0056b3;
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {

  /* 左右レイアウトを縦並びに */
  .layout {
    grid-template-columns: 1fr;
  }

  /* サイドバーを横メニュー化 */
  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  /* タイマーを縦並び */
  .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  /* タイマー横幅を広げる */
  .timer-box {
    width: 90%;
    max-width: 350px;
  }

  /* ボタンを横いっぱいに */
  button {
    width: 100%;
  }

}
