@font-face {
    font-family: "Instrument Sans";
    src: url("InstrumentSans-Medium.ttf") format("truetype");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "Instrument Sans", sans-serif;
    margin: 0;
    padding: 20px;
    padding-top: 120px;
    background-color: #1a1a2e;
    background-image: url('images/background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: scroll;
    background-size: cover;
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
}

button {
    min-width: 160px;
    padding: 0 24px;
    background-color: #4c39ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #e743ef;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-color: #4c39ff8c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2000;
    box-sizing: border-box;
}

.top-nav .logo {
    width: 130px;
    height: auto;
    cursor: pointer;
    border: 0px;
}

.top-nav .back-btn {
    min-width: auto;
    padding: 8px 16px;
    font-size: 14px;
    font-family: inherit;
}

h1 {
    color: white;
    text-align: center;
    margin: 0 0 10px 0;
}

.manifesto {
    overflow: auto;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto;
}

.zoom-controls button {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    background: white;
    color: #333;
    border: 2px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.zoom-controls button:hover {
    background: #e0e0e0;
}

#zoom-reset {
    font-size: 24px;
}

#zoom-level {
    width: 40px;
    background: white;
    color: #333;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 4px 0;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    box-sizing: border-box;
}

.viewport-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

.viewport {
    width: 100%;
    height: 100%;
    overflow: auto;
    border: 2px solid #333;
    position: relative;
    box-sizing: border-box;
}

.start-over-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    min-width: auto;
    padding: 8px 16px;
    background: white;
    color: #333;
    border: 2px solid #333;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
}

.start-over-btn:hover {
    background: #e0e0e0;
}

.zoom-wrapper {
    transform-origin: 0 0;
    transition: transform 0.2s;
    display: block;
    opacity: 0;
    visibility: hidden;
}

.zoom-wrapper.no-transition {
    transition: none !important;
}

.zoom-wrapper.ready {
    opacity: 1;
    visibility: visible;
    transition: transform 0.2s, opacity 0.3s;
}

.image-container {
    position: relative;
    display: inline-block;
}

.x-marker {
    position: absolute;
    /* color: red; */
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 3px white;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-decoration: none;
    padding: 20px;
    /* opacity: 0.5; */
}

.x-marker img {
    width: 64px;
    height: 64px;
    border: none;
}

img {
    display: block;
    border: 2px solid #333;
}

p {
    text-align: center;
    margin: 10px 0 0 0;
}

.manifesto-header {
    max-width: 300px;
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.manifesto-content {
    overflow: hidden;
    max-width: 900px;
}

.manifesto h1 {
    font-size: 3rem;
    text-align: left;
}

.manifesto p {
    font-size: 1.2rem;
    text-align: left;
}

/* Destination page styles */
body.destination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    padding: 20px;
    padding-top: 120px;
    background-color: #1a1a2e;
    background-image: url('images/background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: scroll;
    background-size: cover;
    color: white;
    text-align: center;
    overflow: auto;
}

.destination-content {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.destination h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

.quiz-image-container {
    height: 240px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 30px 0;
}

.quiz-image-container img {
    height: 720px;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
    border: none;
    margin-top: -160px;
}

body.destination p {
    font-size: 1.2em;
    max-width: 600px;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
}

body.destination a {
    color: #fff;
    text-decoration: underline;
    /* margin-top: 30px; */
    display: inline-block;
    font-size: 1.1em;
}

body.destination a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.villain-and-mascot {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.villain-and-mascot img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .manifesto-header {
        float: none;
        margin: 0 auto 20px;
    }

    .manifesto h1 {
        text-align: center;
    }

    .villain-and-mascot img {
        width: 180px;
        height: 180px;
    }

    .quiz-image-container {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .villain-and-mascot img {
        width: 120px;
        height: 120px;
    }

    .quiz-image-container img {
        max-width: 100%;
        width: 100%;
        height: auto;
        min-height: 240px;
        margin-top: 0;
    }
}

.linky-swimming {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    max-width: 100%;
}

.continue-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
}

.remaining-mascots-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin: 30px auto;
    padding: 0 10px;
}

.mascot-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .mascot-thumbnail {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .mascot-thumbnail {
        width: 60px;
        height: 60px;
    }
}

.get-started-btn {
    display: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    margin: 20px auto 0;
}

@media (max-width: 767px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    body.map-view-active {
        overflow: hidden;
        height: 100vh;
    }

    .get-started-btn {
        display: block;
    }

    .viewport-container {
        display: none;
    }

    body.map-view-active .manifesto,
    body.map-view-active .get-started-btn {
        display: none;
    }

    body.map-view-active .viewport-container {
        display: flex;
        flex: 1;
    }
}