@font-face {
    font-family: "TTNormsPro";
    src: url("https://db.onlinewebfonts.com/t/3a3cf05c9023b2262a388c6fe5c9eba4.woff2") format("woff2"),
        url("https://db.onlinewebfonts.com/t/3a3cf05c9023b2262a388c6fe5c9eba4.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "TTNormsPro";
    src: url("https://db.onlinewebfonts.com/t/1f3770651b913d542f4e5fc03aedd525.woff2") format("woff2"),
        url("https://db.onlinewebfonts.com/t/1f3770651b913d542f4e5fc03aedd525.woff") format("woff");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "TTNormsPro";
    src: url("https://db.onlinewebfonts.com/t/0e94dfaa68fd5bdea6c87629842de8f3.woff2") format("woff2"),
        url("https://db.onlinewebfonts.com/t/0e94dfaa68fd5bdea6c87629842de8f3.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "TTNormsPro";
    src: url("https://db.onlinewebfonts.com/t/3a0d2649ae5188fe47c26703fc45721f.woff2") format("woff2"),
        url("https://db.onlinewebfonts.com/t/3a0d2649ae5188fe47c26703fc45721f.woff") format("woff");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.liveage-map-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: "TTNormsPro", sans-serif;
    background-color: #000;
    background-image: var(--liveage-map-bg-image, url('https://liveage.pl/mapa/nowa/wp-content/uploads/2025/08/1.svg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#createOwnMapBanner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10010;
    background: linear-gradient(135deg, rgba(65, 255, 210, 0.15) 0%, rgba(128, 104, 233, 0.15) 100%);
    border: 1px solid rgba(65, 255, 210, 0.4);
    border-radius: 30px;
    padding: 12px 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#createOwnMapBanner:hover {
    background: linear-gradient(135deg, rgba(65, 255, 210, 0.25) 0%, rgba(128, 104, 233, 0.25) 100%);
    border-color: rgba(65, 255, 210, 0.7);
    transform: translateX(-50%) scale(1.02);
}

#createOwnMapBanner a {
    color: #41FFD2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

#createOwnMapBanner a:hover {
    color: #fff;
}

.liveage-map-container * {
    box-sizing: border-box;
}


.corner-border {
    position: absolute;
    width: 50px;
    height: 50px;
    z-index: 2;
    pointer-events: none;
}

.corner-border::before,
.corner-border::after {
    content: "";
    position: absolute;
    background: #fff;
}

.corner-top-left {
    top: 12%;
    left: 5%;
}

.corner-top-left div {
    color: #41FFD2;
    font-weight: 200;
    font-size: 12px;
    letter-spacing: 2px;
    position: absolute;
    top: calc(50% - 4px);
    left: 20px;
    display: block;
    width: 200px;
}

.corner-top-left::before {
    width: 50px;
    height: 5px;
    top: 0;
    left: 0;
    background-color: #19FF00;
}

.corner-top-left::after {
    width: 5px;
    height: 50px;
    top: 0;
    left: 0;
    background-color: #19FF00;
}

.corner-top-right {
    top: 12%;
    right: 5%;
    display: block;
    width: 200px;
}

.corner-top-right div {
    color: #41FFD2;
    font-weight: 200;
    font-size: 12px;
    letter-spacing: 2px;
    position: absolute;
    top: calc(50% - 4px);
    right: 20px;
}

.corner-top-right::before {
    width: 50px;
    height: 5px;
    top: 0;
    right: 0;
    background-color: #8068e9;

}

.corner-top-right::after {
    width: 5px;
    height: 50px;
    top: 0;
    right: 0;
    background-color: #8068e9;
}

.corner-bottom-left {
    bottom: max(12%, 150px);
    left: 5%;
    display: block;
    width: 200px;
}

.corner-bottom-left div {
    color: #41FFD2;
    font-weight: 200;
    font-size: 12px;
    letter-spacing: 2px;
    position: absolute;
    top: 35%;
    left: 20px;
}

.corner-bottom-left::before {
    width: 50px;
    height: 5px;
    bottom: 0;
    left: 0;
    background-color: #007AFF;
}

.corner-bottom-left::after {
    width: 5px;
    height: 50px;
    bottom: 0;
    left: 0;
    background-color: #007AFF;
}

.corner-bottom-right {
    bottom: max(12%, 150px);
    right: 5%;
    display: block;
    width: 200px;
}

.corner-bottom-right div {
    color: #41FFD2;
    font-weight: 200;
    font-size: 12px;
    letter-spacing: 2px;
    position: absolute;
    top: 35%;
    right: 20px;
}

.corner-bottom-right::before {
    width: 50px;
    height: 5px;
    bottom: 0;
    right: 0;
    background-color: #FFA300;
}

.corner-bottom-right::after {
    width: 5px;
    height: 50px;
    bottom: 0;
    right: 0;
    background-color: #FFA300;
}

#linesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#mapContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center;
    transition: transform 0.3s ease;
    will-change: transform;
}

#mapContainer.shifted {
    margin-right: 250px;
}

.star {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    z-index: 100;
    background: transparent !important;
    will-change: transform, filter;
}

.star.circle.a:hover,
.star.diamond.a:hover {
    transform: scale(1.7);
    filter: drop-shadow(0 0 12px #19FF00) invert(50%) sepia(94%) saturate(2099%) hue-rotate(76deg) brightness(134%) contrast(119%) !important;
}

.star.circle.b:hover,
.star.diamond.b:hover {
    transform: scale(1.7);
    filter: drop-shadow(0 0 12px #8068e9) invert(52%) sepia(88%) saturate(3653%) hue-rotate(227deg) brightness(95%) contrast(92%) !important;
}

.star.circle.c:hover,
.star.diamond.c:hover {
    transform: scale(1.7);
    filter: drop-shadow(0 0 12px #007AFF) brightness(0.4) sepia(1) saturate(1000%) hue-rotate(200deg) contrast(1.2) !important;
}

.star.circle.d:hover,
.star.diamond.d:hover {
    transform: scale(1.7);
    filter: drop-shadow(0 0 12px #FFA300) invert(60%) sepia(91%) saturate(1978%) hue-rotate(24deg) brightness(144%) contrast(100%) !important;
}

.star.circle.a.selected,
.star.diamond.a.selected {
    animation: starPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px #19FF00) invert(50%) sepia(94%) saturate(2099%) hue-rotate(76deg) brightness(134%) contrast(119%) !important;
}

.star.circle.b.selected,
.star.diamond.b.selected {
    animation: starPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px #8068e9) invert(52%) sepia(88%) saturate(3653%) hue-rotate(227deg) brightness(95%) contrast(92%) !important;
}

.star.circle.c.selected,
.star.diamond.c.selected {
    animation: starPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px #007AFF) brightness(0.4) sepia(1) saturate(1000%) hue-rotate(200deg) contrast(1.2) !important;
}

.star.circle.d.selected,
.star.diamond.d.selected {
    animation: starPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px #FFA300) invert(60%) sepia(91%) saturate(1978%) hue-rotate(24deg) brightness(144%) contrast(100%) !important;
}

.star-tooltip {
    position: absolute;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
    z-index: 1000;
}

.tooltip-text {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    white-space: normal;
    max-width: 300px;
    line-height: 1.4;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.tooltip-line {
    height: 1px;
    background: #fff;
    width: 0;
    transition: width 0.3s ease;
}

.persistent-tooltip {
    position: absolute;
    pointer-events: none;
    white-space: nowrap;
    color: #fff;
    font-size: 11px;
    z-index: 99;
}

#centerPlus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.big-plus.horizontal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 0.5px;
    background-color: #fff;
    transform: translate(-50%, -50%);
}

.big-plus.vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.5px;
    height: 600px;
    background-color: #fff;
    transform: translate(-50%, -50%);
}

.small-plus.horizontal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 1.5px;
    background-color: #fff;
    transform: translate(-50%, -50%);
}

.small-plus.vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5px;
    height: 100px;
    background-color: #fff;
    transform: translate(-50%, -50%);
}

/* ==========================================
   Bottom Menu Wrapper (widget + menu bar)
   ========================================== */

/* 1. Menu wrapper */
#menuWrapper {
    position: absolute;
    bottom: 38px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 88%;
    max-width: 1300px;
}

/* 2. Menu bar */
#menu2 {
    display: flex;
    gap: 0;
    justify-content: center;
    align-items: center;
    border: 0.5px solid rgba(65, 255, 210, 0.35);
    padding: 14px 40px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
    position: relative;
    z-index: 2;
}

/* 3. GENERUJ button */
.menu-btn-primary {
    font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #41ffd2;
    background: rgba(65, 255, 210, 0.35);
    border: 0px solid rgba(65, 255, 210, 0.6);
    border-radius: 0px !important;
    padding: 10px 28px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-right: 24px;
}

.menu-btn-primary span {
    position: relative;
    z-index: 2;
}

.menu-btn-primary::after {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #41ffd2;
    transition: all 0.35s ease;
    z-index: 1;
}

.menu-btn-primary:hover::after {
    width: 100%;
}

.menu-btn-primary:hover {
    color: #000;
}

/* 4. Icon buttons */
.menu-btn-icon {
    background: transparent !important;
    border: none;
    color: #41ffd2;
    cursor: pointer;
    padding: 8px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    transition: none;
}

.menu-btn-icon:hover {
    background: transparent !important;
}

.menu-btn-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.menu-btn-icon:hover:not(.menu-btn-disabled) img,
.menu-btn-icon:hover:not(.menu-btn-disabled) svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(65, 255, 210, 0.5));
}

/* Disabled state */
.menu-btn-icon.menu-btn-disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

/* Link styled as icon button */
a.menu-btn-icon {
    text-decoration: none;
}

/* 5. Label hidden - shown via JS tooltip */
.menu-btn-label {
    display: none;
}

/* 9. Arrow on menu top border pointing DOWN to icon */
.menu-arrow {
    position: absolute;
    top: -9px;
    width: 16px;
    height: 16px;
    background: rgba(10, 16, 22, 0.5);
    border-right: 0.7px solid rgba(65, 255, 210, 0.3);
    border-bottom: 0.7px solid rgba(65, 255, 210, 0.3);
    transform: translateX(-50%) rotate(45deg);
    z-index: 5;
    display: none;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

/* Scrollbar track spacing from rounded corners */
.widget-content::-webkit-scrollbar-track {
    margin-top: 18px;
    margin-bottom: 6px;
}

.widget-content::-webkit-scrollbar-thumb {
    background: rgba(65, 255, 210, 0.25);
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb:hover {
    background: rgba(65, 255, 210, 0.45);
}

/* ==========================================
   Unified Widget (attached above menu)
   ========================================== */

/* 6. Widget - slides up from menu */
#unifiedWidget {
    width: 94%;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.5s ease;
}

#unifiedWidget.visible {
    max-height: 60vh;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
}

/* 7. Widget panel - transparent glass */
.widget-panel {
    width: 100%;
    background: rgba(10, 16, 22, 0.5);
    border: 0.7px solid rgba(65, 255, 210, 0.3);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    backdrop-filter: blur(7px) saturate(120%);
    -webkit-backdrop-filter: blur(7px) saturate(120%);
    position: relative;
    font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', monospace;
    max-height: 55vh;
    overflow: hidden;
}

.widget-content {
    padding: 30px 36px 40px 40px;
    max-height: 55vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar on content */
.widget-content::-webkit-scrollbar {
    width: 5px;
}

.widget-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(65, 255, 210, 0.25) transparent;
}


.widget-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #41ffd2;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.widget-close:hover {
    opacity: 0.6;
}

#mapLoader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    color: #41ffd2;
    font-size: 24px;
    z-index: 100000;
    letter-spacing: 2px;
}

#dragTooltip {
    position: fixed;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #fff;
    border-radius: 4px;
    pointer-events: none;
    z-index: 100002;
    top: -1000px;
    left: -1000px;
    display: block;
}

.main {
    position: fixed;
    top: 50%;
    left: 50%;
    height: 1px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: -42vw -4vh 0px 0px rgba(255, 255, 255, 0.5), 25vw -41vh 0px 0px rgba(255, 255, 255, 0.5),
        -20vw 49vh 0px 1px rgba(255, 255, 255, 0.5), 5vw 40vh 1px 1px rgba(255, 255, 255, 0.5), 29vw 19vh 1px 0px rgba(255, 255, 255, 0.5),
        -44vw -13vh 0px 0px rgba(255, 255, 255, 0.5), 46vw 41vh 0px 1px rgba(255, 255, 255, 0.5), -3vw -45vh 0px 1px rgba(255, 255, 255, 0.5),
        47vw 35vh 1px 0px rgba(255, 255, 255, 0.5), 12vw -8vh 1px 0px rgba(255, 255, 255, 0.5), -34vw 48vh 1px 1px rgba(255, 255, 255, 0.5),
        32vw 26vh 1px 1px rgba(255, 255, 255, 0.5), 32vw -41vh 1px 1px rgba(255, 255, 255, 0.5), 0vw 37vh 1px 1px rgba(255, 255, 255, 0.5),
        34vw -26vh 1px 0px rgba(255, 255, 255, 0.5), -14vw -49vh 1px 0px rgba(255, 255, 255, 0.5), -12vw 45vh 0px 1px rgba(255, 255, 255, 0.5),
        -44vw -33vh 0px 1px rgba(255, 255, 255, 0.5), -13vw 41vh 0px 0px rgba(255, 255, 255, 0.5), -36vw -11vh 0px 1px rgba(255, 255, 255, 0.5),
        -23vw -24vh 1px 0px rgba(255, 255, 255, 0.5), -38vw -27vh 0px 1px rgba(255, 255, 255, 0.5), 16vw -19vh 0px 0px rgba(255, 255, 255, 0.5);
    animation: zoom 60s alternate infinite;
    z-index: 1;
}
/* ─── Widoczny focus dla klawiatury (WCAG 2.1 - 2.4.7) ────────────────── */
.liveage-map-container :is(button, a, input, [tabindex]):focus-visible {
    outline: 2px solid #41FFD2;
    outline-offset: 2px;
    border-radius: 2px;
}
/* Nie usuwamy obrysu bez zamiennika - resetujemy tylko dla myszy */
.liveage-map-container :is(button, a, input):focus:not(:focus-visible) {
    outline: none;
}
