/* 基础样式 - 确保兼容性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

/* 页面样式 */
.page {
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: 100%;
    opacity: 0;
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}

.page.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    opacity: 1;
}

/* 标题样式 */
h1, h2, h3 {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 36px;
    margin: 30px 0;
}

h2 {
    font-size: 24px;
    color: #333;
}

/* 按钮样式 */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 12px;
    background-color: #007AFF;
    color: white;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-secondary {
    background-color: white;
    color: #007AFF;
    border: 1px solid #007AFF;
}

.btn:hover {
    background-color: #0066CC;
}

.btn-secondary:hover {
    background-color: #f0f7ff;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 欢迎页面样式 */
.welcome-logo {
    text-align: center;
    margin: 40px 0;
}

.welcome-logo i {
    font-size: 72px;
    color: #007AFF;
    background-color: rgba(0,122,255,0.1);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin: 0 auto 20px;
}

.welcome-buttons {
    margin-top: auto;
}

.footer {
    text-align: center;
    margin-top: auto;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
}

/* 身份证扫描页面 */
.scan-area {
    border: 4px dashed #007AFF;
    border-radius: 12px;
    height: 200px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin: 30px 0;
    position: relative;
}

.scan-icon {
    font-size: 48px;
    color: #007AFF;
}

.scan-line {
    position: absolute;
    height: 3px;
    width: 80%;
    background-color: #007AFF;
    -webkit-animation: scan 2s infinite;
}

@-webkit-keyframes scan {
    0% { top: 20%; }
    50% { top: 80%; }
    100% { top: 20%; }
}

/* 信息确认页面 */
.info-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    margin-bottom: 20px;
}

.info-item {
    width: 50%;
    margin-bottom: 15px;
}

.info-label {
    font-size: 14px;
    color: #666;
}

.info-value {
    font-weight: 500;
    color: #333;
}

.total-price {
    text-align: right;
    font-size: 18px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 房型升级页面 */
.room-list {
    margin-bottom: 20px;
}

.room-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
}

.room-item.selected {
    border-color: #007AFF;
    background-color: rgba(0,122,255,0.05);
}

.room-image {
    width: 100%;
    height: 150px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.room-info {
    padding: 15px;
}

.room-title {
    font-weight: 500;
    font-size: 18px;
    margin-bottom: 5px;
}

.room-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.room-price {
    color: #007AFF;
    font-weight: 500;
}

/* 支付页面 */
.payment-method {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.payment-method.selected {
    border-color: #007AFF;
    background-color: rgba(0,122,255,0.05);
}

.payment-icon {
    font-size: 24px;
    margin-right: 15px;
}

.payment-name {
    font-size: 16px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.modal-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-buttons .btn {
    flex: 1;
    margin: 0;
}

/* 倒计时样式 */
.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #007AFF;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* 确保scan-icon在倒计时显示时被隐藏 */
.scan-area.counting .scan-icon {
    opacity: 0;
}

.scan-area.counting .scan-line {
    opacity: 0;
}

/* 入住成功页面样式 */
.success-header {
    text-align: center;
    margin: 10px 0 20px 0;
    animation: fadeInDown 0.8s ease-out;
}

.success-icon {
    text-align: center;
    margin: 10px 0;
    animation: successPulse 2s ease-in-out;
}

.success-subtitle {
    color: #666;
    font-size: 16px;
    margin-top: 10px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.success-icon i {
    font-size: 60px;
    color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(76, 175, 80, 0.3));
}

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* 房间信息卡片样式 */
.room-info-card {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border: 2px solid #007AFF;
    animation: slideInUp 0.6s ease-out 0.3s both;
    padding: 20px;
    margin-bottom: 15px;
}

.room-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.room-number {
    font-size: 36px;
    font-weight: bold;
    color: #007AFF;
    text-align: center;
    margin: 8px 0;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 122, 255, 0.2);
}

.room-floor {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 20px;
    display: block;
    width: 100%;
}





/* 酒店设施卡片样式 */
.facilities-card {
    animation: slideInUp 0.6s ease-out 0.6s both;
    padding: 20px;
    margin-bottom: 15px;
}

.facilities-card h3::before {
    content: "🏨";
    font-size: 20px;
}

/* 设施网格样式 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.feature-item {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007AFF;
}

.feature-icon {
    font-size: 24px;
    color: #007AFF;
    margin-bottom: 8px;
}

.feature-icon i {
    color: #007AFF;
    font-size: 24px;
}

.feature-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 12px;
    color: #666;
    opacity: 0.8;
}

/* 入住成功页面卡片样式优化 */
#checkinSuccess .card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#checkinSuccess .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#checkinSuccess .card h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#checkinSuccess .card h3::before {
    content: "🏨";
    font-size: 20px;
}

/* 入住成功页面样式 */
#checkinSuccess {
    overflow-y: auto;
    padding-bottom: 100px; /* 为浮动按钮留出空间 */
}

/* 入住成功页面标题样式 */
#checkinSuccess h2 {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 支付成功动画样式 */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 操作按钮区域样式 */
.action-buttons {
    margin-top: auto;
    padding: 15px 0;
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

/* 入住成功页面按钮样式优化 */
#checkinSuccess .btn {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#checkinSuccess .btn i {
    font-size: 18px;
}

#checkinSuccess .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #004499);
}

#checkinSuccess .btn-secondary {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #007AFF;
    border: 2px solid #007AFF;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.1);
}

#checkinSuccess .btn-secondary:hover {
    background: linear-gradient(135deg, #f0f7ff, #e8f2ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.2);
}

/* 全局浮动按钮样式 */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #004499);
}

.floating-btn i {
    font-size: 24px;
}

.btn-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid rgba(0, 0, 0, 0.8);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.floating-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 智能客服按钮特殊样式 */
#smartServiceBtn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

#smartServiceBtn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

/* 二维码弹窗样式 */
.qr-modal {
    max-width: 380px;
    text-align: center;
    padding: 30px;
}

.qr-code-container {
    margin: 20px 0;
}

#qrCode {
    width: 100%;
    margin: 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    display: block;
}

.qr-desc {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 二维码图片样式优化 */
#qrCode img {
    transition: transform 0.3s ease;
}

#qrCode img:hover {
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .room-number {
        font-size: 36px;
    }
    
    .success-icon i {
        font-size: 60px;
    }
    
    #checkinSuccess h2 {
        font-size: 24px;
    }
    
    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
    }
    
    .floating-btn i {
        font-size: 20px;
    }
}