:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --text-light: #7f8c8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-color);
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.search-box:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 200px;
    padding: 5px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* 主要内容区 */
.main-content {
    display: flex;
    margin: 30px 0;
    gap: 30px;
}

/* 左侧查询区域 */
.postcode-query {
    flex: 2;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--accent-color);
}

/* 查询表单 */
.query-form {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}

.query-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.query-btn:hover {
    background: #16a085;
    transform: translateY(-2px);
}

/* 查询结果 */
.query-result {
    background: var(--light-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    display: none; /* 初始隐藏 */
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.result-title i {
    margin-right: 10px;
    color: var(--accent-color);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.result-item {
    margin-bottom: 10px;
}

.result-label {
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 5px;
}

.result-value {
    font-weight: 600;
    color: var(--secondary-color);
}

/* 常见城市 */
.common-cities {
    margin-top: 40px;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.city-item {
    background: var(--light-color);
    padding: 12px 15px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-item:hover {
    background: var(--accent-color);
    color: white;
}

.city-name {
    font-weight: 500;
}

.city-postcode {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.city-item:hover .city-postcode {
    color: rgba(255, 255, 255, 0.8);
}

/* 右侧边栏 */
.sidebar {
    flex: 1;
}

.widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.widget-title i {
    margin-right: 10px;
    color: var(--accent-color);
}

.author-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-color);
    padding: 3px;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.author-bio {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 10px;
}

.category-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--light-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.category-item a:hover {
    background: var(--accent-color);
    color: white;
    padding-left: 15px;
}

.category-item span {
    background: white;
    color: var(--accent-color);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.hot-articles {
    list-style: none;
}

.article-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--light-color);
}

.article-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.article-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.article-item a:hover {
    color: var(--accent-color);
}

.article-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* 页脚 */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin: 5px 15px 5px 0;
    }

    .search-box {
        margin-top: 15px;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .main-content {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-column {
        flex: 100%;
    }
}