body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
    background-color: #f5f5f5;
}

#video-background {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.container {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.8);
}

.price-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
    text-align: right;
    margin: 20px 0;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

/* 查询订单按钮 */
.query-order-btn1 {
    position: absolute;
    top: 20px;
    right: 116px;
    background-color: #ff3d0057;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    z-index: 1;
}

.query-order-btn1:hover {
    background-color: #27ae60;
}

/* 查询订单按钮 */
.query-order-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    z-index: 1;
}

.query-order-btn:hover {
    background-color: #27ae60;
}

.payment-method {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
}

.payment-button {
    flex: 1;
    margin: 0 10px;
    padding: 10px;
    background-color: #f9f9f9;
    color: #333;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-button img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.payment-button:hover,
.payment-button.selected {
    background-color: #e0f7fa;
    border-color: #007BFF;
}

/* 商品卡片样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.product-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.product-card.selected {
    border-color: #3498db;
    background-color: #2ecc71;
}


.product-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #ff0000;
    font-size: 0.9rem;
}

.product-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
}

/* 加载动画 */
.loader {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 移动设备适配 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .query-order-btn {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .query-order-btn1 {
        top: 15px;
        right: 280px;
        padding: 6px 12px;
        font-size: 12px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .product-card {
        padding: 8px;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-info {
        font-size: 0.7rem;
    }

    h1 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

.validation-message {
    margin-top: 5px;
    font-size: 0.8rem;
}

.validation-message.valid {
    color: #27ae60;
}

.validation-message.invalid {
    color: #e74c3c;
}

.price-loading {
    opacity: 0.6;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 按钮并排显示 */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

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

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast {
    padding: 15px 0px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: white;
    background-color: rgba(76, 175, 80, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInDown 0.3s, fadeOut 0.5s 2.5s forwards;
    min-width: 300px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.toast.error {
    background-color: rgba(244, 67, 54, 0.95);
}

.toast.warning {
    background-color: rgba(255, 152, 0, 0.95);
}

.toast.info {
    background-color: rgba(33, 150, 243, 0.95);
}

.toast-close {
    margin-left: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px) translateX(-50%);
    }

}

.product-card {
    background: rgba(18, 18, 18, 0.9);
    /* 深色背景增强对比 */

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

}

.product-card:hover {
    transform: translateY(-5px);
}

#color {
    background: linear-gradient(45deg,
            #FF3864,
            /* 品红 */
            #8A2BE2,
            /* 蓝紫 */
            #4B6AFF,
            /* 宝石蓝 */
            #00FFE0
            /* 霓虹青 */
        );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
    position: relative;
}

#color::before {
    content: "";
    display: block;
    margin-top: -0.25em;
    /* 精确调整行间距 */
}

/* 添加流动光效 */
#color::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 200%;
    height: 120%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transform: rotate(-20deg);
    animation: flow 2.5s infinite;
}

@keyframes flow {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}