/* GLOBAL */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #2b4a7a;
    color: #fff;
    overflow-x: hidden;
}

#main-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SHEET SELECTOR */
#sheet-selector {
    margin: 12px auto;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    z-index: 10000;
}

/* TREE CONTAINER */
#tree-container {
    width: 100%;
    min-height: 640px;
    border: 1px solid #ccc;
    position: relative;
    background: #2b4a7a;
    overflow: hidden;
}

/* LOADING OVERLAY */
#loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}
#loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* BOTTOM PANEL */
#bottom-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px;
    text-align: center;
    padding: 12px 10px;
    z-index: 9998;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(6px);
}

/* LEVEL BUTTONS */
#level-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}
#level-buttons button {
    background: #009688;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

/* SEARCH BUTTONS */
#search-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
#search-buttons a button,
#btn-comment {
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* FLOATING BOTTOM TOGGLE BUTTON */
#bottom-toggle-btn {
    position: fixed;
    bottom: 16px;
    right: 50%;
    transform: translateX(50%);
    z-index: 9999;
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
}

/* TOOLTIP */
.tooltip-box {
    position: fixed;
    left: 80%;
    top: 10%;
    transform: translate(0%, 12px);
    background: rgba(255,255,255,0.98);
    color: #111;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    font-size: 15px;
    max-width: 520px;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .35s ease;
}
.tooltip-box.visible {
    opacity: 1;
    transform: translate(-50%,0);
}

/* NODE HIGHLIGHT ANIMATION */
@keyframes pulseGlow {
    0%, 100% {
        fill: var(--highlight);
        filter: drop-shadow(0 0 4px rgba(255,255,0,0.8));
    }
    50% {
        fill: #fff176;
        filter: drop-shadow(0 0 8px rgba(255,255,0,1));
    }
}

.node text.highlighted {
    font-weight: bold;
    animation: pulseGlow 1.5s infinite;
}

.node circle.selected {
    stroke: var(--highlight, yellow);
    stroke-width: 4px;
    filter: drop-shadow(0 0 6px rgba(255,255,0,0.8));
}

/* LINKS LINES */
.link {
    fill: none;
    stroke: #8fc0ff;
    stroke-width: 1.2px;
    opacity: 0.95;
}

/* FOOTER */
.passion-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 4px;
    font-size: 12px;
    color: #ccc;
}

/* COMMENT PANEL SYSTEM */
#comment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(3px);
    display: none;
    z-index: 9999999;
}

#comment-panel {
    position: absolute;
    right: -80%;
    top: 0;
    height: 100%;
    width: 80%;
    background: #ffffff;
    transition: right 0.35s ease;
    box-shadow: -4px 0 12px rgba(0,0,0,0.25);
}
#comment-panel.active {
    right: 0;
}

#comment-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#close-comment {
    position: absolute;
    left: -40px;
    top: 12px;
    background: #e53935;
    color: #fff;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    z-index: 99;
}
.passion-footer {position:fixed;bottom:0;left:0;width:100%;background:transparent;color:rgba(200,200,200,0.8);font-size:12px;text-align:center;padding:4px;z-index:10000;}
.passion-footer a {color:rgba(200,200,200,0.8);text-decoration:none;margin:0 6px;}
#disclaimer-modal {display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(3px);justify-content:center;align-items:center;z-index:999999;}
#disclaimer-modal.active {display:flex;}
#disclaimer-modal .modal-content {background:#fff;color:#111;border-radius:10px;padding:18px;max-width:320px;text-align:left;}
#close-disclaimer {margin-top:12px;background:#1976d2;color:#fff;border:none;border-radius:6px;padding:6px 12px;cursor:pointer;}
svg {width:100%;height:640px;}
