/* style.css */

/* for index.html */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { overflow: hidden; background: #000; }
#renderCanvas { width: 100vw; height: 100vh; display: block; }
#crosshair {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white; font-size: 24px; pointer-events: none; opacity: 0.7;
}
#ui {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: #fff; padding: 10px 20px;
    border-radius: 8px; font-family: Arial, sans-serif; font-size: 13px;
    text-align: center; pointer-events: none;
}
#sign {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: #ffd700; padding: 8px 20px;
    border-radius: 8px; font-family: Arial, sans-serif; font-size: 16px;
    font-weight: bold; pointer-events: none;
}
#minimapCanvas {
    position: fixed;
    bottom: 12px;
    right: 12px;
    width: 200px;
    height: 200px;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0,0,0,0.7);
    image-rendering: pixelated;
    z-index: 20;
    cursor: default;
}
#weatherCanvas {
    position: fixed;
    bottom: 12px;
    right: 222px;
    z-index: 20;
    cursor: default;
    border-radius: 10px;
}


/* map.js */



/* ── INTERACTION HINT ────────────────────────────────────────────────────── */

#interact-hint {
    position:        fixed;
    bottom:          18%;
    left:            50%;
    transform:       translateX(-50%);
    display:         flex;
    align-items:     center;
    gap:             10px;
    background:      rgba(0, 0, 0, 0.55);
    color:           #fff;
    padding:         8px 18px;
    border-radius:   24px;
    font-family:     sans-serif;
    font-size:       0.95rem;
    letter-spacing:  0.04em;
    pointer-events:  none;
    user-select:     none;
    opacity:         0;
    transition:      opacity 0.2s ease;
}

#interact-hint.visible {
    opacity: 1;
}

.hint-key {
    display:      inline-block;
    background:   rgba(255, 255, 255, 0.25);
    border:       1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding:      2px 9px;
    font-weight:  700;
    font-size:    1rem;
}

.hint-label {
    font-weight: 400;
}

/* ── INTERACTION POPUP ───────────────────────────────────────────────────── */

#interaction-popup {
    position:        fixed;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      rgba(0, 0, 0, 0.55);
    z-index:         1000;
    opacity:         0;
    pointer-events:  none;
    transition:      opacity 0.25s ease;
}

#interaction-popup.visible {
    opacity:        1;
    pointer-events: all;
}

#popup-inner {
    position:        relative;
    background:      rgba(15, 20, 35, 0.95);
    color:           #e8eaf0;
    border:          1px solid rgba(255, 255, 255, 0.12);
    border-radius:   16px;
    width:           90%;
    max-width:       560px;
    max-height:      80vh;
    display:         flex;
    flex-direction:  column;
    box-shadow:      0 12px 48px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    font-family:     sans-serif;
    overflow:        hidden;
}

/* sticky header */
#popup-header {
    flex-shrink:   0;
    padding:       24px 48px 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#popup-title {
    margin:      0;
    font-size:   1.35rem;
    font-weight: 700;
    color:       #ffffff;
    line-height: 1.3;
}

#popup-title a {
    color:           #ffffff;
    text-decoration: none;
    border-bottom:   1px solid rgba(255, 255, 255, 0.3);
    transition:      border-color 0.15s;
}
#popup-title a:hover {
    border-bottom-color: #ffffff;
}

/* scrollable body */
#popup-body {
    flex:       1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding:    20px 28px 24px;
    display:    flex;
    flex-direction: column;
    gap:        18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

#popup-body::-webkit-scrollbar       { width: 5px; }
#popup-body::-webkit-scrollbar-track { background: transparent; }
#popup-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

/* close button */
#popup-close {
    position:    absolute;
    top:         14px;
    right:       16px;
    background:  transparent;
    border:      none;
    color:       rgba(255, 255, 255, 0.5);
    font-size:   1.5rem;
    line-height: 1;
    cursor:      pointer;
    padding:     0 4px;
    transition:  color 0.15s;
    z-index:     1;
}
#popup-close:hover { color: #fff; }

/* tags */
#popup-tags {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}
.popup-tag {
    background:    rgba(100, 160, 255, 0.15);
    border:        1px solid rgba(100, 160, 255, 0.35);
    color:         #90c0ff;
    font-size:     0.75rem;
    font-weight:   600;
    letter-spacing:0.05em;
    text-transform:uppercase;
    padding:       3px 10px;
    border-radius: 20px;
}

/* description */
#popup-description {
    font-size:   0.92rem;
    line-height: 1.7;
    color:       #b8bfcc;
    margin:      0;
}

/* illustrations */
#popup-illustrations {
    display:   flex;
    flex-wrap: wrap;
    gap:       8px;
}
.popup-illustration {
    width:        100%;
    max-height:   180px;
    object-fit:   cover;
    border-radius:8px;
    border:       1px solid rgba(255,255,255,0.08);
}

/* section blocks (tenants, equipments) */
.popup-section { display: flex; flex-direction: column; gap: 6px; }

.popup-section-title {
    font-size:     0.7rem;
    font-weight:   700;
    letter-spacing:0.1em;
    text-transform:uppercase;
    color:         rgba(255, 255, 255, 0.35);
    margin:        0;
}

.popup-section ul {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        4px;
}

.popup-section ul li {
    font-size:    0.88rem;
    color:        #c8cdd8;
    padding:      6px 10px;
    background:   rgba(255,255,255,0.04);
    border-radius:6px;
    border-left:  2px solid rgba(100,160,255,0.3);
}

.popup-section ul li a {
    color:           #7eb8f7;
    text-decoration: none;
    word-break:      break-word;
}
.popup-section ul li a:hover {
    color:           #aed4ff;
    text-decoration: underline;
}

/* links */
#popup-links {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        6px;
}
#popup-links li a {
    display:         inline-block;
    color:           #7eb8f7;
    font-size:       0.88rem;
    text-decoration: none;
    word-break:      break-all;
    transition:      color 0.15s;
}
#popup-links li a:hover {
    color:           #aed4ff;
    text-decoration: underline;
}


/** OBJECT LABEL **/
#object-label {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: sans-serif;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#object-label.visible {
    opacity: 1;
}

