* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    touch-action: manipulation;
}

/* 全体のスクロールを無効化 */
body {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    flex-direction: column;
    padding: 20px;
}


.container {
    text-align: center;
    width: 100%;
    margin-top: 10vh;
}

#currentTime {
    font-size: 32px; /* テキストサイズを大きく */
    margin-bottom: 30px; /* マージンを大きく */
    color: #333;
}

/* ボタンスタイル */
#pulseButton {
    width: 250px; 
    height: 250px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-size: 32px; 
    border: none;
    cursor: pointer;
    margin: auto;
}

#pulseButton:active {
    background-color: #0056b3;
}

#bpmValue {
    font-size: 64px; /* 心拍数の表示を大きく */
    font-weight: bold;
}

.bpmText {
    font-size: 28px; /* bpmテキストを大きく */
}

div#recording-sign {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: auto;
    margin-top: 16px;
    background: rgba(0,0,255,0);/*背景色*/
}

/* ボタンを横に並べるためのコンテナ */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* ボタン間のスペース */
    margin-top: 3vh;
}

/* 「出生」ボタンと「人工呼吸開始」ボタンの共通スタイル */
#birthButton, #respirationButton {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ffa500;
    color: white;
    font-size: 18px; /* テキストサイズを調整 */
    border: none;
    cursor: pointer;
    display: flex; /* コンテンツを中央に配置 */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px;
}

#birthButton {
    background-color: #ffa500;
}

#birthButton:active {
    background-color: #cd853f;
}

#respirationButton {
    background-color: #88bb11;
}

#respirationButton:active {
    background-color: #66aa11;
}

.birthLabel {
    text-align: center;
}


/* ハンバーガーメニュー */
.hamburger-menu {
    position: absolute;
    top: 10px;
    right: 10px;
}

.menu-icon {
    font-size: 48px;
    cursor: pointer;
}

/* オーバーレイのスタイル */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 12;
}

.menu-content {
    display: none;
    position: absolute;
    top: 30px;
    right: 10px;
    background-color: white;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 13;
    width: 220px; /* 横幅を設定 */
}

.menu-content a {
    display: block;
    text-decoration: none;
    color: black;
    padding: 12px 20px; /* パディングを少し増やす */
    font-size: 18px; /* テキストサイズを大きく */
    text-align: left;
}

.menu-content a:hover {
    background-color: #f0f0f0;
}

.download-menu {
    background-color: transparent;
    border: none;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
    padding: 16px 4px 16px 16px;
}

/* モーダルのスタイル */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* 背景を半透明に */
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    text-align: left;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* モーダルのスタイル */
.birth-modal {
    visibility: hidden; /* 初期状態では見えない */
    position: fixed;
    top: -5vh; /* 初期状態では画面の外 */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    opacity: 0; /* 初期状態では透明 */
    transition: top 0.5s ease, opacity 0.5s ease, visibility 0s 0.5s; /* visibilityは遅延処理 */
}

/* モーダルが表示されているとき */
.birth-modal.show {
    visibility: visible; /* 表示 */
    top: 5vh; /* 表示時の位置を画面の上部に設定 */
    opacity: 1; /* モーダルを不透明に */
    transition: top 0.5s ease, opacity 0.5s ease; /* アニメーション */
}

/* モーダルのコンテンツ */
#birth-modal-content {
    font-size: 16px;
    color: #333;
}

#usageText {
    white-space: pre-wrap; /* 改行を維持 */
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* スマートフォン用のスタイル調整 */
@media (max-width: 600px) {
    #pulseButton {
        width: 75vw;
        height: 75vw;
    }

    #bpmValue {
        font-size: 64px;
    }

    .bpmText {
        font-size: 36px;
    }

    #currentTime {
        font-size: 36px;
    }

    .menu-content a {
        font-size: 16px;
        padding: 10px 16px;
    }
}
