/* Сброс и базовые стили */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #000;
}

/* Глобус */
#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

/* Панель управления (иконки слева вверху) */
.controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.control-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    transition: transform 0.2s ease;
}

.control-item:hover {
    transform: scale(1.05);
}

.control-item img {
    width: 28px;
    height: 28px;
}

.control-item span {
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* Контакты — правый нижний угол, содержимое выравнено влево */
.contacts {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* <-- выравниваем содержимое влево */
    gap: 4px;
    z-index: 10;
    text-align: left;
}

.contacts a {
    display: flex;
    align-items: center;
    color: white;
    font-size: 14px;
    text-decoration: none;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    gap: 6px;
}

.contacts a img {
    width: 20px;
    height: 20px;
}

.contacts a:hover {
    text-decoration: underline;
}

/* Пульсирующие точки */
.pulse {
    width: 18px;
    height: 18px;
    background: red;
    border-radius: 50%;
    position: absolute;
    animation: pulse 2s infinite;
    border: 2px solid white;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Поп-ап */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background: #111;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    text-align: center;
}

.popup-content h3 {
    color: white;
    margin-bottom: 10px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.video-grid iframe {
    width: 100%;
    height: 120px;
    border: none;
}

#popup-close {
    margin-top: 15px;
    padding: 8px 16px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
}

#popup-close:hover {
    background: #555;
}