/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 标题样式 */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #006633;
    padding: 0 1rem;
}

/* 区段样式 */
.section {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 页眉样式 */
header {
    background: linear-gradient(135deg, #006633 0%, #00994d 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin: 0.5rem auto;
    color: white;
    padding: 0 15px;
}

header .slogan {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 回收品类网格样式 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 102, 51, 0.2);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.category-name {
    font-weight: 600;
    color: #006633;
}

/* 表单样式 */
form {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #006633;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #006633;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.2);
}

.submit-btn {
    background-color: #006633;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: block;
    margin: 1.5rem auto 0;
    width: 100%;
    max-width: 300px;
}

.submit-btn:hover {
    background-color: #00802b;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* 联系方式样式 */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 1rem;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px;
}

.contact-icon {
    font-size: 2.5rem;
    color: #006633;
    margin-bottom: 1rem;
}

.qr-code {
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
}

/* 回到顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #006633;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: #004d26;
}

/* 提示消息样式 */
.message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .section {
        padding: 1.5rem 0;
    }
}