* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
}

/* 添加底部布局样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* 主要内容区域 - 可以自动扩展 */
.main-content {
    flex: 1; /* 占据剩余空间 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

body {
    background-color: #f9f7f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.pickup-container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    margin: 0 auto; /* 居中 */
}

.form-section {
    padding: 25px; /* 减少内边距 */
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-section {
    padding: 25px; /* 减少内边距 */
    display: none;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 50px); /* 限制结果区域高度 */
}

.section-title {
    color: #2a7a55;
    border-bottom: 3px solid #369168;
    padding-bottom: 12px; /* 减少内边距 */
    margin-bottom: 20px; /* 减少外边距 */
    font-size: 22px; /* 稍微减小字体 */
    font-weight: 600;
    text-align: center;
}

.form-group {
    margin-bottom: 16px; /* 减少间距 */
}

label {
    display: block;
    margin-bottom: 6px; /* 减少间距 */
    font-weight: 600;
    color: #2a7a55;
    font-size: 15px; /* 稍微减小字体 */
}

input[type="text"] {
    width: 100%;
    padding: 10px 12px; /* 减少内边距 */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px; /* 稍微减小字体 */
    transition: all 0.3s;
    background: #f9f7f5;
}

input[type="text"]:focus {
    border-color: #369168;
    outline: none;
    box-shadow: 0 0 0 3px rgba(54, 145, 104, 0.2);
}

.hint {
    font-size: 12px; /* 减小提示文字 */
    color: #666;
    margin-top: 4px; /* 减少间距 */
}

.action-buttons {
    display: flex;
    gap: 8px; /* 减少间距 */
    flex-wrap: wrap;
    margin-top: 16px; /* 减少间距 */
}

button {
    padding: 10px 16px; /* 减少内边距 */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px; /* 稍微减小字体 */
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px; /* 减小最小宽度 */
}

.query-btn {
    background: linear-gradient(to right, #369168, #2a7a55);
    color: white;
    width: 50%;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.3);
}

.query-btn:hover {
    background: linear-gradient(to right, #2a7a55, #1e5c3f);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.4);
}

.record-btn {
    background: linear-gradient(to right, #369168, #2a7a55);
    color: white;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.3);
}

.record-btn:hover {
    background: linear-gradient(to right, #2a7a55, #1e5c3f);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.4);
}

.clear-btn {
    background: white;
    color: #369168;
    border: 2px solid #369168;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.2);
    width: 50%;
}

.clear-btn:hover {
    background: rgba(54, 145, 104, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.3);
}

.back-btn {
    background: white;
    color: #369168;
    border: 2px solid #369168;
    margin-top: 16px; /* 减少间距 */
    width: 50%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.2);
}

.back-btn:hover {
    background: rgba(54, 145, 104, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.3);
}

.error {
    color: #e74c3c;
    margin-top: 12px; /* 减少间距 */
    padding: 10px; /* 减少内边距 */
    background: #ffeaea;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    display: none;
    font-size: 14px; /* 减小字体 */
}

.loading {
    color: #369168;
    padding: 12px; /* 减少内边距 */
    text-align: center;
    font-size: 15px; /* 稍微减小字体 */
    display: none;
}

.order-item {
    border: 2px solid #e8f4fd;
    padding: 16px; /* 减少内边距 */
    margin-bottom: 16px; /* 减少间距 */
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.order-info p {
    margin-bottom: 10px; /* 减少间距 */
    font-size: 15px; /* 稍微减小字体 */
    line-height: 1.4; /* 减小行高 */
    padding: 6px 0; /* 减少内边距 */
    border-bottom: 1px solid #f0f0f0;
}

.order-info p:last-child {
    border-bottom: none;
}

.password-highlight {
    background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
    border: 2px solid #f1eeeb;
    border-radius: 8px;
    padding: 10px 12px; /* 减少内边距 */
    margin: 8px 0; /* 减少间距 */
    text-align: center;
}

.password-text {
    font-size: 16px;
    font-weight: bold;
    color: #2a7a55;
    background: white;
    padding: 6px 10px; /* 减少内边距 */
    border-radius: 6px;
    border: 1px dashed #369168; /* 减小边框 */
    margin: 6px 0; /* 减少间距 */
    word-break: break-all;
}

.important-note {
    color: #e67e22;
    font-size: 12px; /* 减小字体 */
    margin: 4px 0; /* 减少间距 */
    line-height: 1.3; /* 减小行高 */
}

.download-section {
    background: linear-gradient(135deg, #f1eeeb 0%, #e8e4e0 100%);
    border: 2px solid #369168;
    border-radius: 8px;
    padding: 10px 12px; /* 减少内边距 */
    margin: 8px 0; /* 减少间距 */
    text-align: center;
}

.download-link {
    display: inline-block;
    background: linear-gradient(to right, #369168, #2a7a55);
    color: white;
    padding: 8px 20px; /* 减少内边距 */
    border-radius: 20px; /* 减小圆角 */
    text-decoration: none;
    font-weight: bold;
    font-size: 14px; /* 减小字体 */
    margin: 4px 0; /* 减少间距 */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.3);
}

.download-link:hover {
    background: linear-gradient(to right, #2a7a55, #1e5c3f);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.4);
}

/* 紧凑版样式 - 更节省空间 */
.password-compact {
    text-align: center;
}

.compact-note {
    color: #d33e3e;
    font-size: 13px;
    margin: 2px 0;
    line-height: 1.2;
}

.pickup-btn {
    background: linear-gradient(to right, #369168, #2a7a55);
    color: white;
    padding: 10px 20px; /* 减少内边距 */
    font-size: 15px; /* 稍微减小字体 */
    width: 100%;
    margin: 12px auto 0; /* 减少间距 */
    display: block;
    box-shadow: 0 4px 15px rgba(54, 145, 104, 0.3);
}

.pickup-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.pickup-btn.loading {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
}

.pickup-btn:hover {
    background: linear-gradient(to right, #2a7a55, #1e5c3f);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(54, 145, 104, 0.4);
}

.no-phone-warning {
    color: #e67e22;
    background: #fff9e6;
    padding: 10px; /* 减少内边距 */
    border-radius: 8px;
    text-align: center;
    margin-top: 12px; /* 减少间距 */
    border-left: 4px solid #e67e22;
    font-size: 14px; /* 减小字体 */
}

.records-list {
    margin-top: 12px; /* 减少间距 */
}

.record-item {
    border-left: 4px solid #369168;
    padding: 12px; /* 减少内边距 */
    margin-bottom: 12px; /* 减少间距 */
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.record-item p {
    margin-bottom: 6px; /* 减少间距 */
    font-size: 14px; /* 减小字体 */
}

/* 商品分隔线样式 */
.item-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ddd 50%, transparent 100%);
    margin: 15px 0;
}

@media (max-width: 768px) {
    .container {
        max-width: 95%;
        max-height: 85vh; /* 移动端更小高度 */
    }

    .form-section, .result-section {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    button {
        min-width: 100%;
    }

    .order-info strong {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 20px;
    }

    input[type="text"] {
        padding: 8px 10px;
    }

    button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .order-item {
        padding: 12px;
    }

    .password-text {
        font-size: 14px;
        padding: 6px 10px;
    }

    .download-link {
        padding: 8px 20px;
        font-size: 14px;
    }
}