/* Стили для страницы с глобусом */
.globe-page {
    overflow: hidden;
}

.globe-wrapper {
    overflow: hidden;
}

.globe-header {
    position: relative;
    z-index: 10;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(46, 204, 113, 0.3);
}

.globe-fullscreen {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    overflow: hidden;
    background: var(--gradient-dark);
    touch-action: none;
}

#globeViz {
    width: 100%;
    height: 100%;
    cursor: grab;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#globeViz:active {
    cursor: grabbing;
}

.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 0;
}

/* Информационная панель */
.globe-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    width: calc(100% - 40px);
    pointer-events: none;
}

.globe-info > * {
    pointer-events: auto;
}

.globe-stats {
    background: rgba(10, 10, 10, 0.7);
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid rgba(46, 204, 113, 0.3);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-button {
    background: rgba(46, 204, 113, 0.8);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: flex-end;
    box-shadow: var(--shadow-main);
}

.back-button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.back-button svg {
    width: 16px;
    height: 16px;
    stroke: var(--white);
}

/* Стили для точек на глобусе */
.globe-point {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-light);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
}

.globe-point:hover {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 15px var(--primary);
}

/* Стили для подсказок */
.globe-tooltip {
    position: absolute;
    background: rgba(10, 10, 10, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--white);
    font-size: 14px;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-dark);
}

.globe-tooltip:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(10, 10, 10, 0.8);
}

/* Фиксы для Telegram WebApp */
.telegram-app {
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .globe-header {
        padding: 5px 0;
        height: auto;
        min-height: 50px;
        display: flex;
        align-items: center;
    }
    
    .globe-fullscreen {
        height: calc(100vh - 60px);
    }
    
    .globe-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        bottom: 10px;
        left: 10px;
        width: calc(100% - 20px);
        gap: 10px;
    }
    
    .back-button {
        align-self: center;
        font-size: 0.9rem;
        padding: 8px 15px;
        margin-left: auto;
    }
    
    .globe-stats {
        padding: 10px;
        flex-direction: row;
        gap: 10px;
        width: auto;
        margin-right: auto;
    }
    
    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0;
        margin-right: 5px;
    }
}

/* Особые адаптации для очень маленьких экранов */
@media (max-width: 480px) {
    .globe-header {
        padding: 3px 0;
    }
    
    .globe-info {
        flex-wrap: wrap;
    }
    
    .back-button {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .globe-stats {
        padding: 6px 10px;
    }
}

@media (max-width: 350px) {
    .globe-info {
        flex-direction: column;
    }
    
    .back-button {
        align-self: flex-start;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .globe-stats {
        width: 100%;
        justify-content: center;
    }
}

/* Улучшения для iOS */
@supports (-webkit-touch-callout: none) {
    .globe-fullscreen {
        height: calc(100vh - 80px);
        height: calc(var(--vh, 1vh) * 100 - 80px);
    }
    
    @media (max-width: 768px) {
        .globe-fullscreen {
            height: calc(100vh - 60px);
            height: calc(var(--vh, 1vh) * 100 - 60px);
        }
    }
}