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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    background-image: url('kaodianfenbu.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 0;
    height: 400px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.search-container {
    display: flex;
    margin-bottom: 30px;
    gap: 10px;
}

#search-input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #9c27b0;
}

#search-btn {
    padding: 0 30px;
    background-color: #9c27b0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-btn:hover {
    background-color: #7b1fa2;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #9c27b0;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1em;
    color: #666;
}

.note-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.note-card h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5em;
}

.note-content p {
    line-height: 1.6;
    color: #555;
}

.city-cards-wrapper {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.city-cards {
    margin-bottom: 0;
}

.city-cards h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

#city-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.city-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.city-card-header {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
    color: white;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-card-header h3 {
    font-size: 1.2em;
    margin: 0;
}

.city-card-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
}

.city-card-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.city-card-content.expanded {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.city-card-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.city-card-content li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.city-card-content li:last-child {
    border-bottom: none;
}

.city-card-content li:hover {
    background-color: #fff3e0;
    padding-left: 10px;
    border-left: 4px solid #ff9f43;
}

.card-arrow {
    transition: transform 0.3s;
}

.card-arrow.rotated {
    transform: rotate(180deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        height: 170px;
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .search-container {
        flex-direction: column;
        margin-bottom: 15px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .stat-label {
        font-size: 0.9em;
    }
    
    .note-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .note-card h2 {
        font-size: 1.3em;
    }
    
    .city-cards-wrapper {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .city-cards h2 {
        font-size: 1.3em;
    }
    
    #city-cards-container {
        grid-template-columns: 1fr;
    }
}

/* 搜索结果高亮 */
.highlight {
    background-color: #fff3e0;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #ff9f43;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(156, 39, 176, 0.3);
    border-radius: 50%;
    border-top-color: #9c27b0;
    animation: spin 1s ease-in-out infinite;
}

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

/* 滚动条样式 */
.city-card-content.expanded::-webkit-scrollbar {
    width: 8px;
}

.city-card-content.expanded::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.city-card-content.expanded::-webkit-scrollbar-thumb {
    background: #9c27b0;
    border-radius: 4px;
}

.city-card-content.expanded::-webkit-scrollbar-thumb:hover {
    background: #7b1fa2;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px;
    color: #666;
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}