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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.home-header {
    padding: 16px 24px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.brand-text h1 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.brand-text .slogan {
    font-size: 13px;
    color: #888;
    line-height: 1.3;
}

.home-header nav {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.8;
}

.btn.primary {
    background: #1890ff;
    color: #fff;
}

.btn.secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #d9d9d9;
}

.home-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 40px;
    grid-column: 1 / -1;
}

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-map {
    width: 100%;
    height: 200px;
    background: #fafafa;
}

.card-info {
    padding: 14px;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.card-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.pin-icon {
    font-size: 12px;
    color: #ff4d4f;
    flex-shrink: 0;
}

.card-user {
    font-size: 13px;
    color: #1890ff;
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.public { background: #f6ffed; color: #52c41a; }

.card-score {
    font-size: 13px;
    color: #666;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

#detailMap {
    width: 100%;
    height: 420px;
    min-height: 260px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header .detail-user {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    font-size: 15px;
    font-weight: 500;
    color: #1890ff;
}

.modal-body {
    padding: 20px;
    max-height: 220px;
    overflow-y: auto;
    background: #fafafa;
}

.detail-article {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .home-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .brand-text .slogan {
        display: none;
    }

    .home-main {
        padding: 16px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .card-map {
        height: 160px;
    }

    #detailMap {
        height: 300px;
    }
}
