:root {
    /* Aesthetic Palette */
    --bg-color: #E6E6E6;
    /* Light gray base */
    --text-color: #1A1A1A;
    --border-color: #1A1A1A;
    --border-width: 1px;

    /* Sense Colors (Keep these but maybe slightly muted or sharp?) */
    --color-sight: #E8C547;
    --color-sound: #5A7EBF;
    --color-touch: #D86C5B;
    --color-smell: #7BA77B;
    --color-taste: #B58CB5;

    /* Font */
    /* Font */
    --font-stack: "Gothic A1", sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    /* Removed global uppercase for better Korean typography */
}

/* Intro Section */
#intro {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    z-index: 100;
    transition: opacity 1.2s cubic-bezier(0.86, 0, 0.07, 1);
}

#introCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
}

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

.intro-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--text-color);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.intro-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 20px;
    color: #555;
}

.main-text-area {
    padding: 20px 0;
}

.main-text {
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-color);
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.sub-content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: end;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.description-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sub-text {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: #444;
    word-break: keep-all;
}

.action-col {
    display: flex;
    justify-content: flex-end;
}

.enter-btn {
    background: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 16px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 160px;
}

.enter-btn:hover {
    background: transparent;
}

.enter-btn .btn-text {
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 500;
    color: white;
    transition: color 0.3s;
}

.enter-btn .btn-sub {
    font-family: var(--font-stack);
    font-size: 0.7rem;
    color: #aaa;
    text-transform: uppercase;
    transition: color 0.3s;
    letter-spacing: 1px;
}

.enter-btn:hover .btn-text {
    color: var(--text-color);
}

.enter-btn:hover .btn-sub {
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Map Container */
#mapContainer {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    /* Flat background for technical look */
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#mapContainer.visible {
    opacity: 1;
}

#map {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    /* Technical cursor */
    will-change: transform;
}

#map circle {
    transition: opacity 0.3s ease;
}

/* Filter Bar */
.filter-bar {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0;
    /* Connected buttons */
    background: white;
    border: var(--border-width) solid var(--border-color);
    z-index: 50;
}

.filter-title {
    display: none;
    /* Hide title for cleaner look */
}

.filter-btn {
    border: none;
    border-right: var(--border-width) solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    padding: 10px 20px;
    font-family: var(--font-stack);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:last-child {
    border-right: none;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: var(--text-color);
    color: white;
}

/* Map Controls (Right Side Circles) */
.map-controls {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 50;
}

.map-controls button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: var(--border-width) solid var(--border-color);
    background: white;
    font-family: var(--font-stack);
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.map-controls button:hover {
    background: var(--text-color);
    color: white;
    transform: scale(1.05);
}

/* Polaroid Tooltip (New Static Editorial Design) */
.polaroid {
    position: absolute;
    width: 220px;
    /* Slightly wider for better proportions */
    height: auto;
    /* Auto height to fit content */
    pointer-events: none;
    z-index: 60;
    transition: opacity 0.2s, transform 0.2s;
    background: white;
    border: var(--border-width) solid var(--border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.polaroid.hidden {
    opacity: 0;
    transform: translateY(10px);
    /* Slide up slightly on hide */
}

/* 1. Title (Top Left) */
.polaroid-title {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    text-align: left;
    width: 100%;
}

/* 2. Separator Line */
.polaroid-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    opacity: 0.3;
    margin: 2px 0 5px 0;
}

/* 3. Image Frame */
.polaroid-image-frame {
    width: 100%;
    aspect-ratio: 4/3;
    /* Standard photo ratio */
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border: 1px solid #eee;
}

/* 4. Sensory Phrase (Bottom Center) */
.polaroid-sensory-phrase {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    width: 100%;
    font-weight: 400;
    margin-top: 5px;
    letter-spacing: -0.01em;
    word-break: keep-all;
    /* Ensure Korean doesn't break weirdly */
}

/* Side Panel (Floating Card) */
#sidePanel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Center it initially? Or maybe keep it side but floating */
    /* Let's stick to side but floating style */
    top: 40px;
    left: auto;
    right: 40px;
    bottom: auto;
    transform: none;

    width: 300px;
    height: auto;
    max-height: 80vh;
    background: white;
    border: var(--border-width) solid var(--border-color);
    padding: 20px;
    z-index: 70;
    overflow-y: auto;

    /* Transition for sliding in/out */
    transition: opacity 0.3s, transform 0.3s;
    opacity: 1;
}

#sidePanel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
}

#closePanel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-family: var(--font-stack);
    font-size: 1.2rem;
    cursor: pointer;
}

#panelTitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: 10px;
}

.panel-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
    border: var(--border-width) solid var(--border-color);
}

.sense-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.sense-label {
    width: 60px;
}

.sense-bar-bg {
    flex-grow: 1;
    height: 10px;
    background: transparent;
    border: var(--border-width) solid var(--border-color);
    margin: 0 10px;
}

.sense-bar-fill {
    height: 100%;
    background: var(--text-color);
    /* Monochrome bars? Or keep color? Let's keep color for data clarity */
}

#panelDescription {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    text-transform: none;
    border-top: var(--border-width) solid var(--border-color);
    padding-top: 10px;
}

/* Stats in Polaroid */
.mini-bar {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.6rem;
    width: 100%;
}

.mini-bar-bg {
    flex-grow: 1;
    height: 6px;
    border: 1px solid #eee;
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--text-color);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

/* Menu Button */
.menu-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 80;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: var(--text-color);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.2s ease;
}

.menu-btn:hover .hamburger-line {
    background-color: white;
}

/* Info Modal */
.info-modal {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.info-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    background: white;
    border: 1px solid var(--text-color);
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    color: #555;
}

.modal-body h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-section {
    margin-bottom: 40px;
}

.info-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #333;
    word-break: keep-all;
}

.info-section p.en {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

.credits-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.credit-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.credit-item .role {
    color: #888;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.credit-item .name {
    font-weight: 500;
}