Files
youlegames/codes/minipro/calculation/miniprogram/pages/date-calc/date-calc.wxss
2026-02-08 15:43:32 +08:00

665 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* pages/date-calc/date-calc.wxss */
/* ========== 全局变量 ========== */
page {
background-color: #EBF4F8; /* Color 03: Pale Blue */
color: #2d3436;
/* Color Palette based on '2024 COLOR MATCHING' */
--primary: #11616B; /* Color 01: Deep Teal */
--primary-light: #7BBDB6; /* Color 02: Medium Teal */
--primary-bg: #dbecef; /* Lighter version of Color 02 for backgrounds */
--card-shadow: 0 4rpx 16rpx rgba(17, 97, 107, 0.08);
--card-radius: 24rpx;
--accent-color: #11616B; /* Color 01 */
}
/* ========== 容器 ========== */
.container {
padding: 30rpx 32rpx;
padding-bottom: 80rpx;
min-height: 100vh;
box-sizing: border-box;
}
/* ========== Tab 切换 ========== */
.tab-header {
display: flex;
background: #ffffff; /* Changed to white */
padding: 6rpx;
border-radius: 16rpx; /* Reduced radius */
margin-bottom: 40rpx;
align-items: center;
gap: 4rpx; /* Reduced gap */
box-shadow: 0 4rpx 12rpx rgba(17, 97, 107, 0.1);
}
.tab-pill {
flex: 1;
text-align: center;
padding: 16rpx 8rpx; /* Added horizontal padding */
border-radius: 12rpx; /* Reduced radius */
font-size: 24rpx; /* Reduced font size to create more space */
color: #7BBDB6; /* Color 02 */
font-weight: 500;
white-space: nowrap;
transition: all 0.2s ease;
position: relative;
z-index: 1;
}
.help-btn {
width: 64rpx; /* Reduced width */
height: 64rpx; /* Reduced height */
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
color: #11616B;
}
/* Modal Styles Copied & Adapted */
.history-panel {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
opacity: 0;
transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
pointer-events: none;
visibility: hidden;
}
.history-panel.show {
z-index: 1000;
opacity: 1;
pointer-events: auto;
visibility: visible;
}
.history-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(4px);
}
.history-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #EBF4F8; /* Color 03 */
border-radius: 36rpx 36rpx 0 0;
max-height: 80vh;
display: flex;
flex-direction: column;
box-shadow: 0 -8rpx 30rpx rgba(17, 97, 107, 0.15);
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.history-panel.show .history-content {
transform: translateY(0);
}
.history-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 36rpx 40rpx;
border-bottom: 2rpx solid rgba(17, 97, 107, 0.1);
}
.history-title {
color: #11616B; /* Color 01 */
font-size: 34rpx;
font-weight: 600;
letter-spacing: 1rpx;
}
.history-clear {
color: #DC8B70; /* Color 05 */
font-size: 28rpx;
padding: 8rpx 24rpx;
border-radius: 20rpx;
background: rgba(220, 139, 112, 0.15); /* Color 05 faint */
}
/* Help specific */
.help-list {
padding: 0;
}
.help-section {
display: flex;
flex-direction: column;
gap: 40rpx;
padding: 30rpx 40rpx 60rpx;
box-sizing: border-box;
}
.help-item {
display: flex;
gap: 24rpx;
align-items: flex-start;
}
.help-icon {
font-size: 44rpx;
width: 60rpx;
text-align: center;
padding-top: 4rpx;
}
.help-text {
flex: 1;
display: flex;
flex-direction: column;
}
.help-h1 {
font-size: 30rpx;
font-weight: bold;
color: #11616B; /* Color 01 */
margin-bottom: 12rpx;
}
.help-p {
font-size: 26rpx;
color: #2d3436;
line-height: 1.6;
opacity: 0.8;
}
.share-btn-large {
background-color: #11616B !important; /* Color 01 */
color: white !important;
border-radius: 16rpx !important;
font-size: 30rpx !important;
font-weight: 500 !important;
margin-top: 40rpx;
width: 100% !important;
box-shadow: 0 8rpx 20rpx rgba(17, 97, 107, 0.25);
display: flex;
align-items: center;
justify-content: center;
padding: 24rpx 0;
}
.tab-pill.active {
background: #11616B; /* Color 01 */
color: #ffffff;
font-weight: 600;
box-shadow: 0 2rpx 8rpx rgba(17, 97, 107, 0.2);
transform: none;
}
.tab-hover {
background: rgba(0, 0, 0, 0.05); /* 简单的灰色点击态 */
}
.tab-pill.active.tab-hover {
opacity: 0.9;
background: var(--accent-gradient); /* 保持渐变 */
}
/* ========== 通用卡片 ========== */
.card {
background: #fff;
border-radius: var(--card-radius);
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04); /* 更柔和的弥散阴影 */
position: relative;
transition: transform 0.2s;
}
/* 移除旧的顶部边框,使用更现代的左侧强调条 */
.input-card {
border-left: 8rpx solid var(--primary);
}
.card-label {
font-size: 23rpx;
color: #b2bec3;
margin-bottom: 14rpx;
letter-spacing: 1rpx;
font-weight: 600;
}
.card-divider {
height: 1rpx;
background: #f0f0f5;
margin: 20rpx 0;
}
/* ========== 日期选择栏(通用) ========== */
.date-picker-bar {
display: flex;
align-items: center;
justify-content: space-between;
background: #f8f9ff;
border-radius: 16rpx;
padding: 20rpx 24rpx;
border: 1rpx solid #eef0f8;
}
.picker-bar-hover {
background: var(--primary-bg);
border-color: var(--primary-light);
}
.picker-left {
display: flex;
align-items: baseline;
gap: 14rpx;
}
.picker-date {
font-size: 36rpx;
font-weight: 700;
color: #2d3436;
}
.picker-weekday {
font-size: 24rpx;
color: var(--primary);
background: var(--primary-bg);
padding: 4rpx 14rpx;
border-radius: 10rpx;
font-weight: 600;
}
.picker-arrow {
color: var(--primary-light);
font-size: 30rpx;
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
background: var(--primary-bg);
border-radius: 50%;
flex-shrink: 0;
}
/* ========== 天数输入模式1 ========== */
.days-input-group {
display: flex;
align-items: center;
background: #f8f9ff;
border-radius: 16rpx;
padding: 8rpx 24rpx;
margin-bottom: 20rpx;
border: 1rpx solid #eef0f8;
}
.days-input {
flex: 1;
font-size: 42rpx;
font-weight: 700;
color: var(--primary);
height: 72rpx;
font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}
.days-suffix {
font-size: 26rpx;
color: #b2bec3;
font-weight: 500;
flex-shrink: 0;
}
/* ========== 快捷标签 ========== */
.quick-tags {
display: flex;
flex-wrap: wrap;
gap: 14rpx;
}
.tag {
padding: 12rpx 26rpx;
border-radius: 28rpx;
font-size: 24rpx;
font-weight: 600;
border: 1rpx solid transparent;
}
.tag-plus {
background: #EBF4F8; /* Color 03 */
color: #11616B; /* Color 01 */
border-color: #7BBDB6; /* Color 02 */
}
.tag-minus {
background: #FED9CD; /* Color 04 */
color: #DC8B70; /* Color 05 */
border-color: #fceceb;
}
.tag-hover {
background: #7BBDB6 !important; /* Color 02 */
color: #ffffff !important;
border-color: #11616B !important;
transform: scale(0.95);
}
.tag-minus-hover {
background: #DC8B70 !important; /* Color 05 */
color: #ffffff !important;
transform: scale(0.95);
}
/* ========== 结果卡片(通用) ========== */
.result-card {
background: var(--accent-color); /* Color 01 */
color: #fff;
text-align: center;
padding: 40rpx 32rpx;
border-radius: var(--card-radius);
margin-bottom: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(17, 97, 107, 0.25); /* Teal shadow */
position: relative;
overflow: hidden;
}
.result-card::after {
content: '';
position: absolute;
top: -50rpx;
right: -50rpx;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background: rgba(255,255,255,0.1);
}
.result-label {
font-size: 21rpx;
opacity: 0.7;
margin-bottom: 14rpx;
letter-spacing: 2rpx;
font-weight: 600;
}
.result-main {
font-size: 48rpx;
font-weight: 700;
margin-bottom: 6rpx;
letter-spacing: 1rpx;
}
.result-extra {
font-size: 28rpx;
opacity: 0.85;
font-weight: 500;
}
.result-tag {
font-size: 24rpx;
opacity: 0.8;
margin-top: 12rpx;
background: rgba(255,255,255,0.12);
display: inline-block;
padding: 6rpx 18rpx;
border-radius: 14rpx;
}
/* ========== 模式2日期间隔 (Compact) ========== */
.interval-card-compact {
display: flex;
align-items: center;
justify-content: space-between;
padding: 40rpx 24rpx; /* Increase vertical padding */
}
.iv-col {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.iv-small-label {
font-size: 24rpx;
color: #b2bec3;
margin-bottom: 16rpx;
font-weight: 500;
}
.iv-pill {
background: #f8f9ff;
padding: 16rpx 32rpx; /* Wider padding */
border-radius: 20rpx;
font-size: 34rpx;
font-weight: 600;
color: #2d3436;
border: 1rpx solid #eef0f8;
white-space: nowrap;
box-shadow: 0 2rpx 6rpx rgba(0,0,0,0.02);
transition: all 0.2s;
}
.iv-pill-hover {
background: var(--primary-bg);
border-color: var(--primary-light);
color: var(--primary);
transform: translateY(-2rpx);
}
.iv-connector {
width: 80rpx;
display: flex;
justify-content: center;
align-items: center;
padding-top: 40rpx; /* Align with text */
}
.iv-arrow-icon {
font-size: 32rpx;
color: #b2bec3;
font-weight: 700;
}
/* 间隔结果 */
.interval-num-row {
display: flex;
align-items: baseline;
justify-content: center;
margin-bottom: 8rpx;
}
.interval-big-num {
font-size: 72rpx;
font-weight: 700;
letter-spacing: 2rpx;
}
.interval-big-unit {
font-size: 28rpx;
font-weight: 400;
margin-left: 8rpx;
opacity: 0.75;
}
.result-detail-row {
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
margin-top: 8rpx;
opacity: 0.8;
font-size: 24rpx;
}
.result-detail {
font-size: 24rpx;
}
.result-detail-sep {
opacity: 0.4;
font-size: 20rpx;
}
/* ========== 模式3农历转换 ========== */
/* 方向切换(行内文字链接样式 -> 按钮样式) */
.lunar-header-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
}
.dir-switch {
display: flex;
align-items: center;
gap: 8rpx;
padding: 12rpx 24rpx;
border-radius: 12rpx; /* Reduced radius */
background: var(--primary-bg);
transition: all 0.2s;
border: 1rpx solid transparent; /* 防止抖动 */
}
.dir-switch-hover {
background: #e2e0ff; /* slightly darker primary-bg */
transform: scale(0.98);
}
.dir-switch-text {
font-size: 24rpx;
color: var(--primary);
font-weight: 700;
}
.dir-switch-icon {
font-size: 24rpx;
color: var(--primary);
font-weight: 700;
}
/* 农历结果卡片 */
.lunar-result-card {
text-align: center;
}
.lunar-hero {
font-size: 48rpx;
font-weight: 700;
margin-bottom: 6rpx;
letter-spacing: 3rpx;
}
.lunar-sub {
font-size: 26rpx;
opacity: 0.8;
margin-bottom: 16rpx;
font-weight: 500;
}
.lunar-tags {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
justify-content: center;
border-top: 1rpx solid rgba(255,255,255,0.12);
padding-top: 16rpx;
}
.lunar-tag {
background: rgba(255,255,255,0.12);
border-radius: 12rpx;
padding: 8rpx 20rpx;
font-size: 24rpx;
font-weight: 600;
}
.lunar-tag.festival {
color: #ffeaa7;
}
.lunar-tag.term {
color: #55efc4;
}
.lunar-tag.solar {
color: #fff;
}
/* ========== 今日信息 ========== */
.today-card {
background: #fff;
border-radius: var(--card-radius);
padding: 28rpx 32rpx;
margin-bottom: 20rpx;
box-shadow: var(--card-shadow);
border-left: 5rpx solid var(--primary);
}
.today-title {
font-size: 28rpx;
font-weight: 700;
color: #2d3436;
margin-bottom: 16rpx;
}
.today-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14rpx;
margin-bottom: 4rpx;
}
.today-cell {
background: #f8f9ff;
border-radius: 14rpx;
padding: 16rpx 20rpx;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.today-cell-label {
font-size: 21rpx;
color: #b2bec3;
font-weight: 600;
}
.today-cell-value {
font-size: 28rpx;
color: #2d3436;
font-weight: 700;
}
.today-cell-value.accent {
color: var(--primary);
}
.today-term-bar {
display: flex;
align-items: center;
gap: 8rpx;
margin-top: 14rpx;
background: var(--primary-bg);
padding: 14rpx 20rpx;
border-radius: 14rpx;
}
.term-icon {
font-size: 24rpx;
}
.term-text {
font-size: 25rpx;
color: var(--primary);
font-weight: 600;
}