* {
    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, #1a73e8 0%, #4285f4 50%, #34a853 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    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, #1a73e8, #4285f4);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1557b0, #3367d6);
}

.btn-success {
    background: linear-gradient(135deg, #34a853, #46c662);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2d8f47, #3bb956);
}

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

.btn-warning {
    background: linear-gradient(135deg, #fbbc04, #fcda4c);
    color: #333;
}

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

/* Banner */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #34a853 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 Content */
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, #1a73e8, 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(0,0,0,0.12);
}

/* 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(0,0,0,0.15);
}

.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: #e3f2fd;
    color: #1976d2;
}

.category-tag.agricultural {
    background: #e8f5e9;
    color: #388e3c;
}

/* 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: #1a73e8;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #1557b0;
}

/* 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: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.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: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

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

.alert-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1565c0;
}

/* 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: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

/* 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: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.pagination .active {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border-color: #1a73e8;
}

/* 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, #ea4335, #f5685c);
    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: #1a73e8;
}

/* 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(0,0,0,0.1);
}

.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: #1a73e8;
    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, #1a73e8, #34a853);
    -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: #e8f5e9;
    color: #2e7d32;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 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: #4285f4;
}

.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: #ea4335;
    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, #e8f5e9, #c8e6c9);
    border: 1px solid #81c784;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    color: #2e7d32;
}

/* File Upload */
.file-upload {
    border: 2px dashed #1a73e8;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fbff;
}

.file-upload:hover {
    background: #e3f2fd;
    border-color: #1557b0;
}

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

.file-upload-label {
    cursor: pointer;
    color: #1a73e8;
    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: #1a73e8;
    font-weight: 500;
}

.back-btn:hover {
    color: #1557b0;
}

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

.quick-links a {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    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(26, 115, 232, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 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: #333;
}

/* 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;
    }
}
