@keyframes rotateInfinite {
    from {
        transform: translate(-50%, -100%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -100%) rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

#gears-container {
    --displayed-angle: 0deg;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-gear {
    position: absolute;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: Alef, Arial, sans-serif;
    margin: 0;
    padding: 20px 0;
    box-sizing: border-box;
    background-image: url("../img/background-drevo.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    line-height: 1.5;
}

section {
    padding: 20px;
}

#app .warning-no-location {
    display: none;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

#app.no-location .warning-no-location {
    display: block;
    background-color: #564a3c;
    padding: 10px 50px;
    font-size: 1.4em;
}

.version {
    padding-inline: 5px;
    font-size: 0.8em;
}

#setGpsButton {
    display: block;
    margin: 0 auto 30px auto;
    background-color: #28a745;
}

h1 {
    font-weight: bold;
    font-size: 1.8em;
    width: 100%;
    text-align: center;
    background-color: #564a3c;
    padding: 10px 0;
    margin: 0;
}

.heading-app {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

.compass {
    position: relative;
    width: 300px;
    height: 300px;
    aspect-ratio: 1;
    border: 8px solid #604c42;
    border-radius: 50%;
    background-color: #e7e7e7;
    background-image: url("../img/rose.png");
    background-size: 320px 320px;
    background-position: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
    transform: rotate(180deg);
}

.compass.at-target::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgb(57 23 26 / 50%);
    animation: pulse 1.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.needle {
    width: 100px;
    height: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform 0.1s ease-in-out;
    z-index: 10;
}

.needle-img {
    width: 100%;
    rotate: 180deg;
    transform: translate(-10px, -20px);
}

.needle.spin {
    animation: rotateInfinite 3s linear infinite;
}

.is-minecraft {
    font-family: 'Press Start 2P', monospace;
    background-image: url("../img/mine-background.png");
    background-attachment: fixed;

    .compass {
        border-radius: 0;
        border: 0 none;
        background-color: transparent;
        background-image: none;
        box-shadow: inset 0 0 0px rgba(0, 0, 0, 0);
        image-rendering: pixelated;
        overflow: hidden;
        transform: rotate(0deg);
    }

    .compass::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url("../img/mine-compass.png");
        background-size: contain;
        background-position: center;
        opacity: 0.7;
        z-index: 0;
    }

    .compass .needle-img {
        transform: translate(0px, -50px);
        image-rendering: pixelated;
    }
}

a {
    color: #8bc3ff;
    text-decoration: underline;
}

.settings-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white !important;
    border-radius: 20px;
    z-index: 100;
}

.settings-button img {
    width: 55px;
    height: 55  px;
    border-radius: 50%;
}

.settings-content {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    max-width: 85%;
    text-align: center;
    position: relative;
    margin-top: 20px;
    padding: 50px 0;
}

.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #555;
    color: white !important;
    text-decoration: none !important;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #777;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    text-decoration: none !important;
    color: white !important;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
    z-index: 110;
}

.close-button:hover {
    color: #ccc;
}

.geolocation-info {
    margin-top: 15px;
    font-size: 0.9em;
    color: #000;
    background: rgba(255,255,255,0.5);
    padding: 10px;
}

.share-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}
.qr-code {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.qr-code img {
    display: block;
    max-width: 100%;
    height: auto;
}
.generated-url {
    word-break: break-all;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-bottom: 20px;
    border: 1px solid #604c42;
}