/* 社区资源页面样式 */
.community-container {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: #f5f5f5;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
}

.main-content {
    flex: 1;
    overflow: hidden;
}

#map-container {
    width: 100%;
    height: 100%;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.resource-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.resources-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-item {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.resource-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.resource-item.active {
    border-left: 4px solid #4CAF50;
}

.resource-item h4 {
    margin: 0 0 8px 0;
    color: #333;
}

.resource-type {
    display: inline-block;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
    color: white;
}

.resource-type.自习室 {
    background-color: #4CAF50;
}

.resource-type.图书馆 {
    background-color: #2196F3;
}

.resource-type.社区食堂 {
    background-color: #FF9800;
}

.resource-type.健身房 {
    background-color: #9C27B0;
}

.resource-type.其他 {
    background-color: #607D8B;
}

.resource-address {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.resource-description {
    font-size: 14px;
    color: #555;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.coordinates {
    display: flex;
    gap: 10px;
}

.coordinates input {
    width: 50%;
}

.hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.secondary-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* 地图标记样式 */
.custom-marker {
    text-align: center;
}

.custom-marker-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .community-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .main-content {
        height: 400px;
    }
}