/* monopole.quest - Quest Map Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: #1a1612;
    font-family: 'Merriweather', serif;
    color: #3a2e1e;
}

/* Parchment Container */
#parchment-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#parchment-scroll {
    display: flex;
    align-items: center;
    height: 100vh;
    width: fit-content;
    min-width: 500vw;
    background: #e8dcc8;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(200, 180, 152, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(180, 160, 130, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(196, 180, 152, 0.5) 0%, transparent 45%);
    position: relative;
    transform-origin: left center;
    padding: 0 5vw;
    transition: transform 0.8s ease-out;
}

#parchment-scroll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(58, 46, 30, 0.03) 40px,
            rgba(58, 46, 30, 0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(58, 46, 30, 0.02) 40px,
            rgba(58, 46, 30, 0.02) 41px
        );
    pointer-events: none;
}

/* Parchment curl effect */
#parchment-scroll.curled {
    transform: perspective(800px) rotateY(0deg);
}

#parchment-edge {
    position: absolute;
    right: 0;
    top: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to right, #e8dcc8, #c4b498, #a89070);
    box-shadow: inset 10px 0 20px rgba(26, 22, 18, 0.2);
    transform-origin: left center;
    transition: transform 0.8s ease-out;
}

#parchment-scroll.curled #parchment-edge {
    transform: perspective(800px) rotateY(-15deg);
}

/* Compass Rose */
#compass-rose {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 100;
    opacity: 0.85;
    transition: transform 0.3s ease;
}

#compass-rose svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(1px 1px 2px rgba(26, 22, 18, 0.3));
}

/* Quest Banner */
#quest-banner {
    position: absolute;
    top: 8vh;
    left: 8vw;
    z-index: 10;
}

#quest-banner h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: #3a2e1e;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 0 rgba(232, 220, 200, 0.8);
    line-height: 1;
}

#quest-banner .subtitle {
    font-family: 'Merriweather', serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 300;
    color: #4a3e2e;
    margin-top: 0.5rem;
    line-height: 1.6;
    max-width: 400px;
}

/* Scroll Hint */
#scroll-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #4a3e2e;
    opacity: 0.8;
    transition: opacity 0.5s ease;
    z-index: 100;
}

#scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

#scroll-hint svg {
    animation: bounceRight 1.5s ease-in-out infinite;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* Landmarks */
.landmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 450px;
    padding: 0 60px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.landmark.visible {
    opacity: 1;
    transform: translateY(0);
}

.landmark-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.contour-lines {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

.contour-lines::before,
.contour-lines::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 0.5px solid #6b7a4a;
    opacity: 0.3;
}

.contour-lines::before {
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
}

.contour-lines::after {
    top: 25%;
    left: 25%;
    right: 25%;
    bottom: 25%;
}

.landmark-icon {
    width: 60px;
    height: 60px;
    position: relative;
    z-index: 2;
}

.landmark-icon svg {
    width: 100%;
    height: 100%;
}

.map-label {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 2.5vw, 2rem);
    font-weight: 400;
    color: #3a2e1e;
    margin-top: 8px;
    white-space: nowrap;
}

/* Annotation Boxes */
.annotation-box {
    background: #f0e8d8;
    border: 1px solid rgba(58, 46, 30, 0.2);
    border-radius: 2px;
    padding: 20px;
    margin-top: 16px;
    max-width: 350px;
    position: relative;
}

.annotation-box::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(58, 46, 30, 0.2);
}

.annotation-box h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: #8a3030;
    margin-bottom: 8px;
}

.annotation-box p {
    font-family: 'Merriweather', serif;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    font-weight: 300;
    color: #4a3e2e;
    line-height: 1.7;
}

.formula {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(26, 22, 18, 0.05);
    border-left: 3px solid #b89840;
    font-family: 'Fira Code', 'Space Mono', monospace;
}

.mono-text {
    font-family: 'Fira Code', 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #5a4e3e;
}

/* Quest Trail */
#quest-trail {
    position: absolute;
    top: 50%;
    left: 5vw;
    width: calc(100% - 10vw);
    height: 2px;
    background-image: repeating-linear-gradient(
        to right,
        #3a2e1e 0,
        #3a2e1e 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

/* Ocean Blue accents for field-line rivers */
.landmark:nth-child(even) .contour-lines::before {
    border-color: #4a6a7a;
}

/* Dragon Decoration */
#dragon-decoration {
    position: absolute;
    bottom: 12vh;
    right: 15vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
}

#dragon-decoration svg {
    width: 200px;
    height: 80px;
}

.dragon-label {
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: #3a2e1e;
    font-style: italic;
    margin-top: 4px;
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(26, 22, 18, 0.2);
    z-index: 200;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #b89840, #8a3030);
    transition: width 0.2s ease;
}

#progress-label {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-family: 'Caveat', cursive;
    font-size: 0.8rem;
    color: #5a4e3e;
    opacity: 0.6;
}

/* Parchment aging effects */
#parchment-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 90%, rgba(138, 48, 48, 0.05) 0%, transparent 30%),
        radial-gradient(ellipse at 90% 10%, rgba(74, 106, 122, 0.05) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(26, 22, 18, 0.1) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Vignette edges */
#parchment-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 100px rgba(26, 22, 18, 0.5);
    pointer-events: none;
    z-index: 150;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .landmark {
        min-width: 320px;
        padding: 0 30px;
    }

    .annotation-box {
        max-width: 280px;
        padding: 14px;
    }

    #compass-rose {
        width: 70px;
        height: 70px;
    }

    #quest-banner h1 {
        font-size: 2rem;
    }
}
