body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: sans-serif;
}

#game-container {
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.artwork-light-effect {
    display: none;
    position: absolute;
    object-fit: contain;
    opacity: 1.0;
    z-index: 1;
    pointer-events: none;
}

#artworks-strip img.artwork-item {
    position: absolute;
    top: 0px;
    height: 300px;
    width: auto;
    cursor: pointer;
    z-index: 2;
    border-image-source: url('images/frame.png');
    border-image-slice: 45;
    border-width: 15px;
    border-style: solid;
    padding: 5px;
    border-image-repeat: stretch;
}

#artworks-strip {
    position: relative;
    left: 0;
    top: 0;
    height: 100%;
    white-space: nowrap;
    z-index: 1; 
}

#pola {
    position: absolute;
    width: 120px;
    object-fit: contain;
    z-index: 10;
}

#game-container {
    cursor: grab;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 85%;
    max-height: 85vh;
    object-fit: contain;
}

.modal-inner-content {
    text-align: center;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.artwork-reflection {
    display: none;
    position: absolute;
    transform: scaleY(-1);
    opacity: 0.3;
    filter: brightness(0.6) saturate(0.7) contrast(0.8) blur(5px);
    
    --mask-top: linear-gradient(to bottom, transparent 0%, transparent 10%, black 30%, black 100%);
    --mask-bottom: linear-gradient(to top, transparent 0%, transparent 10%, black 30%, black 100%);
    --mask-left: linear-gradient(to right, transparent 0%, transparent 5%, black 15%, black 100%);
    --mask-right: linear-gradient(to left, transparent 0%, transparent 5%, black 15%, black 100%);

    -webkit-mask-image: var(--mask-top), var(--mask-bottom), var(--mask-left), var(--mask-right);
    mask-image: var(--mask-top), var(--mask-bottom), var(--mask-left), var(--mask-right);

    -webkit-mask-composite: destination-in;
    mask-composite: intersect;

    z-index: 0;
    pointer-events: none;
}

#loading-screen {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#loading-pola {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

#loading-text {
    font-size: 18px;
    color: #333;
}

.tap-icon {
    position: absolute;
    width: 60px;
    height: auto;
    display: none !important;
    z-index: 3;
    pointer-events: none;
}

.tap-icon.visible {
    display: block;
    animation-duration: 2.2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.tap-icon.visible:not(.flipped) {
    animation-name: float-animation;
}

.tap-icon.visible.flipped {
    animation-name: float-animation-flipped;
}

.tap-icon.flipped {
    transform: scaleX(-1);
}

@keyframes float-animation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-animation-flipped {
    0%, 100% {
        transform: scaleX(-1) translateY(0);
    }
    50% {
        transform: scaleX(-1) translateY(-10px);
    }
}

#pola-speech-bubble {
    position: absolute;
    width: 80px;
    height: auto;
    display: none;
    z-index: 11;
    pointer-events: none;
    transform-origin: bottom left;
}

#pola-speech-bubble.visible {
    display: block;
    animation: float-animation 2.2s ease-in-out infinite;
}

#screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0;
    z-index: 8; 
    pointer-events: none;
}

#screen-overlay.visible {
    opacity: 0.7;
}

#spotlight {
    position: absolute;
    display: none;
    width: 300px;
    height: auto;
    z-index: 9;
    pointer-events: none;
    opacity: 0.9;
    transform-origin: center top;
}

#crown {
    position: absolute;
    display: none;
    width: 60px;
    height: auto;
    z-index: 20;
    pointer-events: none;
    transition: transform 0.2s ease-out;
}

#action-icon {
    position: absolute;
    display: none;
    width: 50px;
    height: auto;
    z-index: 9;
    cursor: pointer;
    animation: float-animation 2.2s ease-in-out infinite;
}

@keyframes fly-and-rotate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: translateY(-80px) rotate(360deg);
    }
    100% {
        transform: translateX(100vw) translateY(-200px) rotate(2000deg);
        opacity: 0;
    }
}

#background-strip {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    white-space: nowrap;
    z-index: 0;
    font-size: 0;
}

#background-strip img {
    height: 100%;
    width: auto;
}

#army-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.army-pola {
    position: absolute;
    width: 80px;
    height: auto;
    z-index: 12;
    will-change: transform;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s 6;
}

@keyframes hop-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes hop-2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hop-1 {
    animation: hop-1 0.8s ease-in-out infinite;
}
.hop-2 {
    animation: hop-2 1.1s ease-in-out infinite;
}

#loading-logo {
    width: 130px;
    height: auto;
    margin-bottom: 20px;
}

#following-anne {
    position: absolute;
    display: none;
    width: 200px;
    height: auto;
    object-fit: contain;
    z-index: 10;
    pointer-events: none;
    transition: left 0.2s linear, top 0.2s linear, opacity 3s ease-in-out;
}