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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --text-color: #2d3748;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 通用section样式 */
.section {
    padding: 4rem 0;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 首页Hero区域 */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #718096;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-highlight {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

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

/* 特性卡片 */
.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s backwards;
    flex: 0 1 300px;
    text-align: center;
    min-width: 250px;
}

.feature-card:nth-child(2) {
    animation-delay: 0.6s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.8s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* 主按钮统一风格 */
.main-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: #fff !important;
    border: none !important;
    padding: 1rem 3rem !important;
    font-size: 1.2rem !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: var(--shadow) !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    margin: 1rem auto 0 auto !important;
}
.main-btn:hover {
    transform: translateY(-2px) !important;
    opacity: 0.9 !important;
    box-shadow: var(--shadow-lg) !important;
}
.main-btn:active {
    transform: translateY(0) !important;
}

/* 容器确保居中 */
.button-container {
    text-align: center;
    width: 100%;
}

/* 移除老的单独按钮display样式，避免干扰 */
.cta-button, .submit-button, .query-button, .confirm-payment-btn {
    background: none;
    color: inherit;
    border: none;
    padding: unset;
    font: inherit;
    border-radius: unset;
    cursor: pointer;
    box-shadow: none;
    margin: 0;
    display: inline-block;
    transition: none;
    font-weight: inherit;
}

/* 订单卡片 */
.order-card,
.query-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #718096;
    font-size: 0.875rem;
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* 计数器 */
.counter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.counter-group input {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    background: #f7fafc;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.counter-group input:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.price-display {
    margin-top: 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

#totalPrice {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-tip {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.1));
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #d97706;
    border: 2px dashed #f59e0b;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

/* 弹窗整体：限制最大高度并可滚动，避免溢出屏幕 */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

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

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* 支付信息 */
.payment-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.qr-code-container {
    text-align: center;
}

.qr-code-container img {
    width: 200px;
    height: 200px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    background: white;
}

#qrCodeImage {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-hint {
    margin-top: 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.pay-now-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #07c160, #06ae56);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.pay-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.order-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-details h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.price-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
}

.payment-notice {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.payment-notice p {
    margin-bottom: 0.5rem;
}

.payment-notice p:last-child {
    margin-bottom: 0;
}

/* 查询标签页 */
.query-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.query-form {
    display: none;
    text-align: center; /* 让按钮居中 */
}

.query-form.active {
    display: block;
}

.query-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem; /* 添加上边距 */
}

.query-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
}

/* 查询结果 */
.query-results {
    margin-top: 2rem;
}

.result-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: fadeInUp 0.5s ease;
}

.result-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.result-info-item {
    display: flex;
    gap: 0.5rem;
}

.result-info-item strong {
    color: var(--dark-color);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-pending {
    background: #fef5e7;
    color: var(--warning-color);
}

.status-processing {
    background: #e3f2fd;
    color: #2196f3;
}

.status-completed {
    background: #e8f5e9;
    color: var(--success-color);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

/* 页脚 */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-warning {
    color: var(--warning-color);
    font-size: 0.875rem;
}

.footer-icp {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-icp a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-icp a:hover {
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-highlight {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-card {
        width: 100%;
        max-width: 350px;
    }

    .order-card,
    .query-card {
        padding: 2rem 1.5rem;
    }

    .payment-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-content {
        margin: 8% 16px;
        padding: 1rem;
        max-height: 88vh; /* 再收紧一点 */
        overflow-y: auto;
    }

    /* 缩小二维码尺寸与留白 */
    .qr-code-container img {
        width: 200px;
        height: 200px;
        padding: 8px;
    }

    /* 支付/欢迎弹窗里的主按钮在手机端全宽，便于点击 */
    .modal-content .main-btn {
        width: 100% !important;
        margin: 0.5rem 0 0 0 !important;
    }

    .order-details {
        gap: 0.75rem;
    }

    .result-info {
        grid-template-columns: 1fr;
    }
    
    /* 防止iOS自动缩放输入框 */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* 欢迎弹窗样式 */
.welcome-content {
    padding: 1rem 0;
}

.welcome-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.welcome-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.welcome-info p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.6;
}

.welcome-info p:last-child {
    margin-bottom: 0;
}

.contact-info {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.qq-contact {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.qq-contact strong {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
}

.contact-hint {
    color: #718096;
    font-size: 0.9rem;
}

.welcome-notice {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
}

.welcome-notice p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.welcome-notice p:last-child {
    margin-bottom: 0;
}

.welcome-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.no-show-again {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #718096;
    cursor: pointer;
}

.no-show-again input {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 居中"我已完成支付"按钮 */
.modal-content .confirm-payment-btn {
    display: block;
    margin: 0 auto; /* 水平居中 */
}

/* 商品列表样式 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f7fafc;
}

.product-card.disabled:hover {
    transform: none;
    border-color: #e2e8f0;
    box-shadow: none;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    min-height: 40px;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.product-price .currency {
    font-size: 1.2rem;
}

.product-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.product-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #718096;
    font-size: 0.9rem;
}

.product-info-item .label {
    color: #a0aec0;
}

.product-info-item .value {
    font-weight: 600;
    color: #4a5568;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.hot {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.product-badge.new {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.product-select-btn {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.product-card.disabled .product-select-btn {
    background: #cbd5e0;
    cursor: not-allowed;
}

.product-card.disabled .product-select-btn:hover {
    transform: none;
    box-shadow: none;
}

/* 查询按钮在查询面板中不拉伸到100%，保持自适应并居中 */
.query-form .main-btn {
    width: auto !important;
}

