/* 基础样式 */
* {
    box-sizing: border-box;
}

/* 蒙层样式 */
#splashModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 10px;
    overflow-y: auto;
}

/* 弹窗内容 */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

/* 禁用文本选择 */
.modal-content {
    user-select: none;
    -webkit-user-select: none;
}

/* 关闭按钮 */
#closeModal {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    font-size: 14px;
}

#closeModal.active {
    opacity: 1;
    cursor: pointer;
}

/* 倒计时样式 */
#countdown {
    color: #666;
    margin-top: 15px;
    text-align: center;
    font-size: 0.9em;
}

/* 关键提示 */
.important {
    color: #ff4d4f;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 10px;
    background-color: #f5f5f5;
    font-size: 16px;
    line-height: 1.5;
}

.container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 0 auto;
}

.section {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
}

select[multiple] {
    min-height: 100px;
}

h2 {
    color: #333;
    border-bottom: 2px solid #409EFF;
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 18px;
}

.option-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

label {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 14px;
}

input[type="checkbox"] {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
}

select,
input[type="number"],
input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 8px;
    width: 80px;
    font-size: 14px;
}

#result {
    background: #f8f9fa;
    padding: 12px;
    margin-top: 15px;
    border-radius: 4px;
    word-break: break-all;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

#copyBtn {
    background: #409EFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
}

#copyBtn:hover {
    background: #66b1ff;
}

.sku-item {
    color: #666;
    margin: 8px 0;
    font-size: 14px;
}

.result-section {
    position: relative;
    padding-bottom: 15px;
}

.result-container {
    position: relative;
    min-height: 100px;
}

/* 新增份数输入框样式 */
.package-quantity-container {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#packageQuantity {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 吧唧商品样式 */
.badge-variants {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.badge-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    flex-wrap: wrap;
}

.badge-quantity {
    width: 50px;
    margin-left: auto;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    body {
        padding: 20px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .container {
        padding: 20px;
    }
    
    .modal-content {
        max-width: 600px;
        padding: 30px;
    }
    
    #closeModal {
        top: 15px;
        right: 15px;
    }
    
    .badge-variants {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #copyBtn {
        width: auto;
        position: absolute;
        right: 0;
        bottom: 0;
        transform: translateY(100%);
        margin-top: 0;
    }
    
    .option-group {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .badge-variants {
        grid-template-columns: 1fr;
    }
    
    .package-quantity-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .package-quantity-container input {
        margin-left: 0;
        width: 100%;
    }
    
    .badge-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .badge-quantity {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
    }
}