:root {
    /* 58同城风格主题色 */
    --primary-color: #ff6a00;
    --primary-hover: #ff8533;
    --secondary-color: #ff9500;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

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

/* 头部导航 */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-light);
}

.city-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: var(--bg-light);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.city-selector:hover {
    background: #e8e8e8;
}

.city-name {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.city-arrow {
    font-size: 12px;
    color: var(--text-light);
}

.header-search {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-search input[type="text"] {
    flex: 1;
    height: 42px;
    padding: 0 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.header-search input[type="text"]:focus {
    border-color: var(--primary-hover);
}

.search-btn {
    width: 120px;
    height: 42px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login,
.btn-register,
.btn-publish {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: var(--text-secondary);
}

.btn-login:hover {
    color: var(--primary-color);
}

.btn-register {
    background: transparent;
    color: var(--text-secondary);
}

.btn-register:hover {
    color: var(--primary-color);
}

.btn-publish {
    background: var(--primary-color);
    color: white;
}

.btn-publish:hover {
    background: var(--primary-hover);
}

.header-nav {
    background: #fff8f0;
    border-top: 1px solid var(--border-color);
}

.header-nav .container {
    padding: 0 20px;
}

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

.nav-link {
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
    border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 106, 0, 0.1);
}

/* 主内容区 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: flex;
    gap: 20px;
}

/* 左侧分类侧边栏 */
.category-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.category-title {
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: block;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.category-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
}

/* 右侧主内容区 */
.content-main {
    flex: 1;
    min-width: 0;
}

/* 内容区域 */
.featured-section,
.recommended-section {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.section-title {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover {
    color: var(--primary-hover);
}

/* 卡片网格 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.item-card:hover .item-image img {
    transform: scale(1.05);
}

.item-content {
    padding: 15px;
}

.item-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.location {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 3px;
}

.btn-detail {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-detail:hover {
    background: var(--primary-hover);
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

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

.footer-info h3 {
    margin-bottom: 10px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 15px;
    color: #ecf0f1;
}

.footer-links a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: #bdc3c7;
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: white;
}

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

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

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

.close:hover {
    color: #333;
}

.detail-header {
    margin-bottom: 20px;
}

.detail-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 4px;
}

.detail-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.detail-item span {
    color: var(--text-primary);
    font-size: 16px;
}

.detail-description {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 4px;
    margin-bottom: 20px;
}

.detail-description h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.detail-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.detail-contact {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

.detail-contact h3 {
    margin-bottom: 15px;
}

.detail-contact p {
    margin: 8px 0;
    font-size: 16px;
}

/* 表单弹窗样式 */
.modal-form {
    max-width: 600px;
}

/* 搜索弹窗样式 */
.modal-search {
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

/* 搜索加载中样式 */
.search-loading {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 40px 0;
	color: var(--text-secondary);
}

.search-loading .spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 106, 0, 0.2);
	border-top-color: var(--primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 12px;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.modal-search h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 24px;
}

.search-results-container {
    padding: 0;
}

.search-results-container .no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.search-results-container .no-results p {
    font-size: 16px;
    margin: 0;
}

.modal-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 24px;
}

.form-container {
    padding: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed var(--border-color);
    background-color: var(--bg-light);
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-color);
    background-color: #fff8f0;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.verify-code-group {
    display: flex;
    gap: 10px;
}

.verify-code-group input {
    flex: 1;
}

.btn-verify {
    padding: 12px 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-verify:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-verify:disabled {
    background-color: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.radio-label span,
.checkbox-label span {
    font-size: 14px;
    color: var(--text-primary);
}

.radio-label a,
.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.radio-label a:hover,
.checkbox-label a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.btn-cancel {
    padding: 12px 30px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background-color: #e8e8e8;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.form-actions .btn-submit {
    flex: 1;
    margin-top: 0;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .user-actions {
        justify-content: center;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .category-sidebar {
        width: 100%;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .verify-code-group {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }
}