代码拉取完成,页面将自动刷新
:root {
--primary-color: #2b7efb;
--primary-hover: #1b6eeb;
--success-color: #07c160;
--warning-color: #ff9c19;
--danger-color: #fa5151;
--text-primary: #1f2329;
--text-secondary: #646a73;
--text-light: #8f959e;
--border-color: #e5e6eb;
--background: #f5f6f7;
--card-background: #ffffff;
--shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
}
body {
background-color: var(--background);
color: var(--text-primary);
line-height: 1.5;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 24px;
}
.page-header {
margin-bottom: 32px;
}
.page-header h1 {
font-size: 28px;
font-weight: 600;
margin-bottom: 8px;
}
.sub-title {
color: var(--text-secondary);
font-size: 14px;
}
.rooms-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 24px;
}
.room-card {
background: var(--card-background);
border-radius: 12px;
padding: 16px;
box-shadow: var(--shadow);
animation: cardAppear 0.5s ease backwards;
}
.room-card:nth-child(1) { animation-delay: 0.1s; }
.room-card:nth-child(2) { animation-delay: 0.2s; }
.room-card:nth-child(3) { animation-delay: 0.3s; }
.room-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.room-header h2 {
font-size: 20px;
font-weight: 600;
}
.room-status {
padding: 4px 12px;
border-radius: 16px;
font-size: 13px;
animation: pulse 2s infinite;
}
.room-status.available {
background-color: rgba(7, 193, 96, 0.1);
color: var(--success-color);
}
.room-status.unavailable {
background-color: rgba(250, 81, 81, 0.1);
color: var(--danger-color);
}
.room-info {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 24px;
}
.info-item {
display: flex;
flex-direction: column;
}
.info-item .label {
color: var(--text-light);
font-size: 13px;
margin-bottom: 4px;
}
.info-item .value {
font-size: 16px;
font-weight: 500;
}
.room-schedule {
max-width: 100%;
margin: 0 auto;
}
.schedule-title {
font-size: 14px;
color: var(--text-secondary);
margin-bottom: 12px;
}
.time-slots {
overflow-x: hidden;
scroll-behavior: smooth;
}
.time-slots-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
padding: 12px;
}
.time-slot {
background: var(--card-background);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 12px 8px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
position: relative;
}
.time-slot.available {
background-color: rgba(76, 175, 80, 0.05);
border-color: rgba(76, 175, 80, 0.3);
}
.time-slot.available:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
border-color: var(--success-color);
}
.time-slot.booked {
background-color: rgba(244, 67, 54, 0.05);
border-color: rgba(244, 67, 54, 0.3);
cursor: not-allowed;
opacity: 0.8;
}
.time-slot.selected {
background-color: var(--primary-color);
border-color: var(--primary-color);
color: white;
transform: translateY(-2px);
box-shadow: 0 2px 12px rgba(43, 126, 251, 0.3);
}
.time-slot.selected .status-text {
color: rgba(255, 255, 255, 0.9);
}
.time-text {
font-size: 15px;
font-weight: 500;
color: var(--text-primary);
}
.time-slot.selected .time-text {
color: white;
}
.status-text {
font-size: 12px;
color: var(--success-color);
}
.status-text.booked {
color: var(--danger-color);
}
.book-btn {
width: 100%;
padding: 12px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease;
position: relative;
overflow: hidden;
}
.book-btn:hover {
background-color: var(--primary-hover);
}
.book-btn::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s ease, height 0.6s ease;
}
.book-btn:active::after {
width: 300px;
height: 300px;
}
/* 弹窗样式 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.modal-content {
position: relative;
width: 90%;
max-width: 560px;
margin: 40px auto;
background: var(--card-background);
border-radius: 12px;
overflow: hidden;
}
.modal-header {
padding: 20px 24px;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
font-size: 18px;
font-weight: 600;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
color: var(--text-light);
cursor: pointer;
}
.modal-body {
padding: 24px;
}
.date-picker {
margin: 20px 0;
}
.date-nav {
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
}
.time-picker {
display: grid;
gap: 20px;
}
.time-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
padding: 16px 0;
}
.time-period {
background: var(--background);
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}
.time-period h4 {
color: var(--text-secondary);
margin-bottom: 12px;
font-weight: 500;
}
.modal-footer {
padding: 16px 24px;
border-top: 1px solid var(--border-color);
display: flex;
justify-content: flex-end;
gap: 12px;
}
.modal-footer button {
padding: 8px 24px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
}
.cancel-btn {
background: none;
border: 1px solid var(--border-color);
color: var(--text-secondary);
}
.confirm-btn {
background-color: var(--primary-color);
border: none;
color: white;
}
/* 响应式适配 */
@media (max-width: 768px) {
.container {
padding: 16px;
}
.modal-content {
width: 95%;
margin: 20px auto;
}
}
.toast {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%) translateY(-100%);
background-color: rgba(0, 0, 0, 0.8);
color: white;
padding: 12px 24px;
border-radius: 4px;
font-size: 14px;
z-index: 2000;
opacity: 0;
transition: all 0.3s ease;
}
.toast.show {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
/* 加载动画 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.loading-overlay.show {
opacity: 1;
visibility: visible;
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid var(--primary-color);
border-radius: 50%;
border-top-color: transparent;
animation: spin 0.8s linear infinite;
}
/* 动画关键帧 */
@keyframes spin {
to { transform: rotate(360deg); }
}
@keyframes checkmark {
from {
transform: scale(0) rotate(-45deg);
}
to {
transform: scale(1) rotate(0);
}
}
@keyframes cardAppear {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 脉冲动画效果 */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.loading-slots {
text-align: center;
padding: 20px;
color: var(--text-secondary);
font-size: 14px;
}
.error-slots {
text-align: center;
padding: 16px;
color: var(--danger-color);
background-color: rgba(244, 67, 54, 0.1);
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.error-slots:hover {
background-color: rgba(244, 67, 54, 0.15);
}
/* 选中动画 */
@keyframes selectPulse {
0% {
transform: scale(1) translateY(-2px);
}
50% {
transform: scale(1.05) translateY(-2px);
}
100% {
transform: scale(1) translateY(-2px);
}
}
.time-slot.selected {
animation: selectPulse 0.3s ease;
}
/* 点击涟漪效果 */
.time-slot::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background: radial-gradient(circle, white 10%, transparent 10.01%);
transform: translate(-50%, -50%) scale(0);
opacity: 0;
pointer-events: none;
transition: transform 0.4s, opacity 0.8s;
}
.time-slot:active::after {
transform: translate(-50%, -50%) scale(4);
opacity: 0.3;
transition: 0s;
}
/* 响应式调整 */
@media (max-width: 768px) {
.time-slots-grid {
gap: 8px;
padding: 8px;
}
.time-slot {
padding: 10px 6px;
}
.time-text {
font-size: 14px;
}
.status-text {
font-size: 11px;
}
}
/* 响应式布局调整 */
@media (max-width: 1200px) {
.time-slots-grid {
grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
gap: 10px;
}
}
@media (max-width: 768px) {
.time-slots-grid {
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
padding: 8px;
}
.time-slot {
padding: 8px 6px;
}
.time-text {
font-size: 14px;
}
.status-text {
font-size: 12px;
}
}
@media (max-width: 480px) {
.time-slots-grid {
grid-template-columns: repeat(3, 1fr);
gap: 6px;
padding: 6px;
}
.time-slot {
padding: 6px 4px;
}
.time-text {
font-size: 13px;
}
.status-text {
font-size: 11px;
}
}
.time-slots-container {
padding: 12px;
}
.period-title {
font-size: 14px;
color: var(--text-secondary);
margin: 12px 0 8px;
padding-left: 4px;
}
.time-slots-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
margin-bottom: 16px;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。