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

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

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

header h1 {
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.filters select:hover {
    border-color: #999;
}

.filters button {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.filters button:hover {
    background: #ff5252;
}

.filters button#refreshData {
    background: #4CAF50;
}

.filters button#refreshData:hover {
    background: #45a049;
}

.filters button#refreshData:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.map {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 400px;
    background: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar h2 {
    padding: 20px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    color: #333;
}

.estate-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.estate-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.estate-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.estate-item.selected {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.estate-item h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.estate-item .price {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.estate-item .details {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.estate-item .metro {
    margin-top: 8px;
    color: #2196F3;
    font-size: 13px;
}

.estate-item .link {
    margin-top: 8px;
    display: inline-block;
    color: #2196F3;
    text-decoration: none;
    font-size: 13px;
}

.estate-item .link:hover {
    text-decoration: underline;
}

/* Стили для меток на карте */
.ymaps-2-1-79-balloon {
    max-width: 400px;
}

.balloon-content {
    padding: 10px;
}

.balloon-content h3 {
    margin-bottom: 10px;
    color: #333;
}

.balloon-content .info-row {
    margin: 5px 0;
    font-size: 14px;
}

.balloon-content .info-label {
    font-weight: bold;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 300px;
    }
    
    .map {
        height: 400px;
    }
}
