/* 在线留言页面现代样式 */
.contact-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}
.contact-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

/* 联系信息样式 */
.contact-info-block {
    background: linear-gradient(135deg, rgb(222, 232, 232), hsl(214, 18%, 92%));
    color: #000000;
    padding: 40px;
    position: relative;
}
.contact-info-block h3 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.contact-info-block h3 i {
    margin-right: 10px;
    font-size: 28px;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.contact-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}
.contact-icon i {
    font-size: 20px;
}
.contact-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 500;
}
.contact-details p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* 二维码样式 */
.qrcode-section {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}
.qrcode-item {
    text-align: center;
    flex: 1;
}
.qrcode-item:not(:last-child) {
    margin-right: 15px;
}
.qrcode-item img {
    width: 120px;
    height: 120px;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.qrcode-item p {
    margin-top: 10px;
    font-size: 13px;
}

/* 折叠按钮 */
.collapse-toggle {
    background: rgba(6, 7, 50, 0.893);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.collapse-toggle:hover {
    background: rgba(49, 47, 47, 0.696);
}

/* 留言表单样式 */
.contact-form-block {
    padding: 40px;
}
.form-header {
    text-align: center;
    margin-bottom: 30px;
}
.form-header h2 {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 10px;
}
.form-header p {
    color: #666;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}
.form-control::placeholder {
    color: #adb5bd;
}

.textarea-field {
    resize: none;
    min-height: 150px;
}

.submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}
.submit-btn:active {
    transform: translateY(0);
}

/* 验证码样式 */
.captcha-group {
    display: flex;
    align-items: center;
}
.captcha-input {
    flex: 1;
    margin-right: 15px;
}
.captcha-image {
    width: 120px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.captcha-image:hover {
    transform: scale(1.05);
}

/* 留言记录样式 - 整行显示 */
.message-history-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 0;
    overflow: hidden;
}

.message-history-header {
    background: linear-gradient(135deg, lab(73.06% -1.74 -9.25), hsl(207, 5%, 41%));
    color: rgb(41, 28, 28);
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.message-history-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.message-history-header h3 i {
    margin-right: 10px;
    font-size: 18px;
}

.message-history-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-history-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message-history-content {
    padding: 30px;
    display: none; /* 默认折叠 */
}

.message-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.message-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.message-author {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.message-content {
    color: #555;
    line-height: 1.6;
}

.message-meta {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.message-meta span {
    font-size: 12px;
    color: #888;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
}

.admin-reply {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.admin-reply .message-author {
    color: #3498db;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .contact-info-block {
        padding: 30px;
    }
    .contact-form-block {
        padding: 30px;
    }
    .qrcode-section {
        flex-direction: column;
        align-items: center;
    }
    .qrcode-item {
        margin-right: 0 !important;
        margin-bottom: 20px;
    }
    .qrcode-item:last-child {
        margin-bottom: 0;
    }
    .message-history-content {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .contact-section {
        padding: 40px 0;
    }
    .form-header h2 {
        font-size: 24px;
    }
    .contact-info-block,
    .contact-form-block {
        padding: 25px;
    }
    .message-history-header {
        padding: 15px 20px;
    }
    .message-history-header h3 {
        font-size: 18px;
    }
}