:root {
    --bg-color: #1a1a1a;
    --ui-accent: #f0c040;
    --ui-bg: rgba(0, 0, 0, 0.7);
    --text-color: #ffffff;
    --font-main: 'Nunito', Tahoma, Geneva, Verdana, sans-serif;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Viewport Handling */
.viewport {
    position: relative;
    width: 100%;
    max-width: 2560px; /* Desktop */
    height: 100%;
    max-height: 1400px;
    background: #000;
    overflow: hidden;
}

.mode-examine .viewport {
    overflow-x: auto;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 500px) {
    

    .mode-move #zone-image {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }

    .mode-examine #zone-image {
        height: 100vh;
        width: auto;
        max-width: none;
        object-fit: cover;
    }

    .mode-examine .zone-container {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
    }
}

/* Desktop Styles */
@media (min-width: 501px) {
    #zone-image {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }
}

.zone-container {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.4s ease-in-out;
}

#zone-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mode-examine #zone-image {
    object-fit: contain;
}

/* UI Elements */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 10;
}

.mode-examine .ui-layer {
    position: fixed;
}

.ui-layer > * {
    pointer-events: auto;
}

.zone-info {
    background: var(--ui-bg);
    padding: 10px 20px;
    border-left: 5px solid var(--ui-accent);
    align-self: flex-start;
}

/* Controls */
.nav-controls, .examine-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn, .mode-btn {
    background: var(--ui-bg);
    border: 2px solid var(--ui-accent);
    color: var(--ui-accent);
    padding: 15px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    transition: all 0.2s;
}

.nav-btn:hover, .mode-btn:hover {
    background: var(--ui-accent);
    color: black;
}

/* Hotspots */
.hotspots-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hotspot {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid var(--ui-accent);
    border-radius: 50%;
    background: rgba(240, 192, 64, 0.2);
    cursor: pointer;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

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

/* Detail Overlay */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.detail-content {
    background: #222;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--ui-accent);
}

#detail-title {
    margin-bottom: 20px;
}


.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    background: none;
    border: none;
    color: var(--ui-accent);
    cursor: pointer;
}

#detail-image {
    width: 100%;
    height: auto;
}

.detail-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--ui-bg);
    border: 1px solid var(--ui-accent);
    color: var(--ui-accent);
    padding: 10px;
    cursor: pointer;
    z-index: 5;
}

#prev-image { left: 10px; }
#next-image { right: 10px; }

.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--ui-bg);
    color: var(--ui-accent);
    padding: 2px 8px;
    font-size: 0.8em;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

