/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header (主导航) ===== */
header {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ff8fa3 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 20px rgba(255, 71, 87, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: rgba(0,0,0,0.1);
    padding: 8px 0;
    font-size: 14px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo span {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    display: block;
}

nav ul {
    display: flex;
    gap: 5px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
    display: block;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance {
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e63946, #ff4757);
}

.btn-success {
    background: linear-gradient(135deg, #ff8fa3, #ffb3c1);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #ff6b81, #ff8fa3);
}

.btn-danger {
    background: linear-gradient(135deg, #c0392b, #e63946);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffcad0, #ffe5e8);
    color: #c0392b;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ===== Banner 横幅 ===== */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ff8fa3 100%);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    color: white;
    z-index: 2;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot.active {
    background: white;
    transform: scale(1.3);
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

/* ===== Main 主内容区 ===== */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #ff4757, transparent);
    border-radius: 2px;
}

/* ===== Cards 卡片 ===== */
.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 71, 87, 0.15);
}

/* ===== Info Grid 信息卡片网格 ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.info-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.info-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 71, 87, 0.2);
}

.info-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.info-item .info-content {
    padding: 20px;
}

.info-item .info-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-item .info-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.info-item .info-publisher {
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.category-tag.used {
    background: #ffe5e8;
    color: #c0392b;
}

.category-tag.agricultural {
    background: #ffcad0;
    color: #ff4757;
}

/* ===== Section 区块 ===== */
.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.view-all {
    color: #ff4757;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #c0392b;
}

/* ===== Form 表单 ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff4757;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.12);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* ===== Alerts 提示框 ===== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
}

.alert-success {
    background: #ffe5e8;
    border: 1px solid #ffcad0;
    color: #c0392b;
}

.alert-error {
    background: #fff0f2;
    border: 1px solid #ffb3bc;
    color: #c0392b;
}

.alert-warning {
    background: #fff8e1;
    border: 1px solid #ffecb3;
    color: #f57f17;
}

.alert-info {
    background: #ffe5e8;
    border: 1px solid #ffcad0;
    color: #ff4757;
}

/* ===== Table 表格 ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

table th,
table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

table th {
    background: #fff0f2;
    font-weight: 600;
    color: #c0392b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: #ffe5e8;
}

/* ===== Pagination 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

.pagination .active {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    border-color: #ff4757;
}

/* ===== Detail Page 详情页 ===== */
.detail-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.detail-image {
    flex: 0 0 450px;
}

.detail-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.detail-info {
    flex: 1;
    padding: 10px 0;
}

.detail-info h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.detail-info .info-row {
    margin-bottom: 20px;
    font-size: 16px;
}

.detail-info .info-label {
    font-weight: 600;
    color: #666;
    margin-right: 10px;
}

.detail-info .info-value {
    color: #333;
}

.price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.detail-content {
    background: white;
    padding: 35px;
    border-radius: 16px;
    margin-top: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.detail-content h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 22px;
}

.detail-content p {
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

.hidden-phone {
    color: #999;
    font-style: italic;
}

.phone-display {
    font-size: 20px;
    font-weight: bold;
    color: #ff4757;
}

/* ===== Login/Register 登录注册 ===== */
.login-page,
.register-page {
    max-width: 450px;
    margin: 60px auto;
}

.register-page {
    max-width: 500px;
}

.center-box {
    background: white;
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 71, 87, 0.12);
}

.center-box h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #1a1a1a;
    font-size: 26px;
}

.center-box .form-group {
    margin-bottom: 24px;
}

.center-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}

.center-box .link-text {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

.center-box .link-text a {
    color: #ff4757;
    text-decoration: none;
    font-weight: 600;
}

.center-box .link-text a:hover {
    text-decoration: underline;
}

/* ===== Stats 数据统计 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

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

.stat-card h3 {
    font-size: 42px;
    background: linear-gradient(135deg, #ff4757, #ff8fa3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* ===== Status Badge 状态徽章 ===== */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-pending {
    background: #fff8e1;
    color: #f57f17;
}

.status-approved {
    background: #ffe5e8;
    color: #c0392b;
}

.status-rejected {
    background: #fff0f2;
    border: 1px solid #ffb3bc;
    color: #c0392b;
}

/* ===== Footer 页脚 ===== */
footer {
    background: linear-gradient(135deg, #2d1014 0%, #4a1820 100%);
    color: white;
    padding: 50px 0 25px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ff6b81;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ===== No Data 无数据提示 ===== */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.no-data p {
    font-size: 18px;
}

/* ===== Required 必填星号 ===== */
.required {
    color: #ff4757;
    margin-left: 3px;
}

/* ===== Notice Box 通知框 ===== */
.notice-box {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 1px solid #ffd54f;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    color: #f57f17;
}

.notice-box strong {
    font-size: 16px;
}

.success-box {
    background: linear-gradient(135deg, #ffe5e8, #ffcad0);
    border: 1px solid #ff8fa3;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    color: #c0392b;
}

/* ===== File Upload 文件上传 ===== */
.file-upload {
    border: 2px dashed #ff4757;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff5f6;
}

.file-upload:hover {
    background: #ffe5e8;
    border-color: #c0392b;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    cursor: pointer;
    color: #ff4757;
    font-weight: 500;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

/* ===== Back Button 返回按钮 ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    color: #ff4757;
    font-weight: 500;
}

.back-btn:hover {
    color: #c0392b;
}

/* ===== Quick Links 快捷链接 ===== */
.quick-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quick-links a {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.quick-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

/* ===== Hero Section 主视觉区块 ===== */
.hero {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ff8fa3 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 30px;
}

/* ===== Modal 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ff4757;
}

/* ===== Responsive 响应式 ===== */
@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .detail-header {
        flex-direction: column;
    }
    
    .detail-image {
        flex: none;
    }
    
    .banner {
        height: 280px;
    }
    
    .banner-content h1 {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
}
