html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* 防止滚动 */
}

body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    /* min-height: 100vh; 已被 html, body 的 height: 100% 替代 */
    background-color: #f0f0f0;
    color: #333;
}

.container {
    text-align: center;
    background-color: white;
    padding: 20px; /* 在小屏幕上可以适当减小内边距 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 90%; /* 容器宽度占屏幕的90% */
    max-width: 400px; /* 最大宽度，防止在大屏幕上过宽 */
    overflow-y: auto; /* 如果内容超出容器，允许容器内部滚动，但body不滚动 */
    max-height: 95vh; /* 限制容器最大高度，确保按钮等可见 */
}

h1 {
    color: #00796b; /* 一个平静的颜色 */
}

#initial-instructions {
    margin-bottom: 20px; /* 初始说明文字和呼吸区域的间距 */
    transition: opacity 0.5s ease-out; /* 为隐藏添加过渡效果 */
}

#initial-instructions.hidden {
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
}

#breathing-circle-container {
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    width: 150px;
    height: 150px;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.8s ease-in-out; /* 为准备动画添加过渡 */
}

/* 新增：点击开始后的准备动画类 */
#breathing-circle-container.preparing-animation {
    transform: transform(-50px) translateY(-30px) scale(1.1); /* 上移并轻微放大 */
}

#breathing-circle {
    width: 100%;
    height: 100%;
    background-color: #4db6ac; /* 呼吸圆圈的颜色 */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 4s ease-in-out, background-color 4s ease-in-out;
}

#instruction {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 10; /* 新增：确保文字在气泡之上 */
}

#timer-display {
    font-size: 24px;
    margin-top: 20px; /* 修改：在呼吸圆圈下方增加一些间距，以防万一 */
    margin-bottom: 20px;
    color: #00796b;
}

button {
    background-color: #00796b;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #004d40;
}

button:disabled {
    background-color: #b2dfdb;
    cursor: not-allowed;
}

/* 呼吸动画状态 */
.breathing-circle-inhale {
    transform: scale(1.5) translateY(-30px);
    background-color: #80cbc4; /* 吸气时的颜色 */
    transition: transform 4s ease-in-out, background-color 1s ease-in-out; /* 吸气放大动画持续4秒 */
}

.breathing-circle-hold {
    transform: scale(1.5) translateY(-30px);
    background-color: #f95503; /* 屏气时的颜色 */
    transition: background-color 6s ease-in-out;
}

.breathing-circle-exhale {
    transform: scale(1) translateY(-30px);
    background-color: #4db6ac; /* 呼气时恢复原状和颜色 */
    transition: transform 8s ease-in-out, background-color 1s ease-in-out; /* 呼气缩小动画持续8秒 */
}