/* 睡眠周期计算器样式表 */

/* 1. 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0F172A;
    color: #E2E8F0;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* 2. 布局 */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 3rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem; /* 控制图标和文字之间的间距 */
}

header h1 {
    font-size: 2.5rem;
    color: #F8FAFC;
    margin: 0;
}

section {
    width: 100%;
}

/* 计算器区域样式 */
#calculator-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
}

.wake-up-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.wake-up-section label {
    font-size: 1.3rem;
    font-weight: 400;
    color: #F1F5F9;
}

.wake-up-section input[type="time"] {
    background-color: #1E293B;
    border: 1px solid #475569;
    border-radius: 12px;
    color: #F1F5F9;
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
    width: 280px;
    text-align: center;
}

/* 时间选择器样式 */
#time-picker-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.swiper-container {
    width: 80px;
    height: 150px;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94A3B8;
    transition: color 0.3s ease;
}

/* 中间的高亮选中效果 */
#time-picker-container::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 2.5rem; /* 大约是每个选项的高度 */
    border-top: 2px solid #FBBF24; /* 金色上边框 */
    border-bottom: 2px solid #FBBF24; /* 金色下边框 */
    pointer-events: none; /* 让鼠标可以点击到下方的滚轮 */
}

.separator-section p {
    font-size: 1.1rem;
    color: #94A3B8;
    font-weight: 400;
    margin: 0;
}

.sleep-now-section {
    display: flex;
    justify-content: center;
}

/* 3. 按钮样式 */
button {
    background-color: #4F46E5;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 300px;
    margin: 0;
}

button:hover {
    background-color: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

button:active {
    transform: translateY(0);
}

/* 返回按钮样式 */
#go-back-btn {
    background-color: #6B7280;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 300px;
    margin-top: 1rem;
}

#go-back-btn:hover {
    background-color: #4B5563;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

#go-back-btn:active {
    transform: translateY(0);
}

/* 4. 结果视图样式 */
#results-view {
    display: none; /* 初始时隐藏 */
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#results-view h2 {
    font-size: 2rem;
    color: #F8FAFC;
    font-weight: 400;
    margin: 0;
}

#results-view h3 {
    font-size: 1.4rem;
    color: #CBD5E1;
    font-weight: 500;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

#result-description {
    font-size: 1.1rem;
    color: #94A3B8;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    max-width: 600px;
}

#result-capsules-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.explanation-text {
    text-align: center;
    margin-top: 1.5rem;
    color: #94A3B8; /* 一个柔和的灰色 */
    max-width: 350px; /* 避免在宽屏上文字太长 */
}

/* 这是新的父容器的样式 */
.result-item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem; /* 胶囊和下方标签之间的小间距 */
}

/* 这是"SUGGESTED"标签本身的样式 */
.suggested-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: #475569; /* 更深的灰色，确保在新背景上清晰可见 */
    letter-spacing: 0.05em; /* 让字母之间稍微有点距离 */
    text-transform: uppercase;
    background-color: #BFDBFE33; /* 淡蓝色背景，20% 透明度 */
    padding: 0.2rem 0.5rem; /* 内边距，给文字留出呼吸空间 */
    border-radius: 4px; /* 圆角，让标签看起来更柔和 */
}

.result-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #F1F5F9;
    font-weight: 400;
    width: 100%;
}

.result-capsule {
    background-color: #E2E8F0;
    color: #1E293B;
    border: none;
    border-radius: 20px;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    width: auto;
    min-width: 180px;
}

.result-capsule:hover {
    background-color: #CBD5E1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



/* 页脚样式 */
footer {
    margin-top: 2rem;
    color: #64748B;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-form {
        padding: 1.5rem;
    }
    
    main {
        padding: 15px;
    }
} 