body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;         /* ← 追加: 画面幅の90%を使う */
    max-width: 350px;   /* ← 変更: でも最大幅は350pxまでね！ */
    height: 450px;
    position: relative; 
}

h1 {
    color: #333;
}

#status {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    transition: font-size 0.3s ease-in-out;
    height: 1.5em;
}

#timer-display {
    font-size: 5em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #4CAF50;
    height: 1.2em;
    line-height: 1.2em;
}

#cycle-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

#cycle-list li {
    font-size: 1.2em;
    color: #888;
    transition: color 0.3s;
}

#cycle-list li.active {
    color: #007bff;
    font-weight: bold;
}

/* --- ボタンのレイアウト --- */
.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.buttons button {
    padding: 10px 10px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    color: #fff;
    text-align: center;
}

/* --- 3点リーダーのアイコン --- */
#menu-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
}

#menu-icon .dot {
    width: 5px;
    height: 5px;
    background-color: #333;
    border-radius: 50%;
    margin: 4px 0;
}

#startButton { background-color: #4CAF50; }
#stopButton { background-color: #f44336; }
#resetButton { background-color: #555; }


/* --- ▼▼▼ ここから設定モーダル用のスタイルを追記 ▼▼▼ --- */

/* モーダル全体（背景の半透明な黒） */
#settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* JSでこのクラスが付いたら、モーダル全体を非表示にする */
#settings-modal.hidden {
    display: none;
}

/* モーダルのコンテンツ部分（白い四角） */
.modal-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #333; /* 黒背景にしたときに文字色が白のままにならないように */
}

/* --- 設定項目を見やすくするスタイル --- */
.modal-content h2 {
    margin-top: 0;
    text-align: center;
}

.modal-content fieldset {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px;
}

.modal-content legend {
    font-weight: bold;
    padding: 0 10px;
}

.modal-content label {
    margin-left: 8px;
}

/* 閉じるボタン */
#close-button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    border: none;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

#close-button:hover {
    background-color: #45a049;
}