@font-face { font-family: "ArialBlackCustom"; src: url("../fonts/arial-black.ttf") format("truetype"); font-weight: 900; }
body { margin: 0; padding: 0.2rem; background-color: #000; font-family: Arial, sans-serif; color: white; box-sizing: border-box; }

.chart-wrapper { width: 100%; max-width: 100%; }
.chart-container { position: relative; width: 100%; height: 515px; background: #111; overflow: hidden; margin-bottom: 5px; display: flex; flex-direction: column; border: 1px solid #333; }
canvas { width: 100% !important; height: 100% !important; display: block; }

.chart-table-interaction-panel { display: flex; justify-content: space-between; gap: 5px; margin-bottom: 5px; width: 100%; }
.metric-card { flex: 1; cursor: pointer; transition: all 0.2s ease; padding: 4px 5px; background: rgba(255,255,255,0.05); border: 1px solid #444; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 40px; }
.metric-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.15); border-color: #fff; }
.metric-title-compact { color: #e6e6e6; font-size: 0.75em; text-transform: uppercase; margin-bottom: 4px; text-align: center; }
.metric-value-main { color: #fff; font-weight: bold; font-size: 0.85em; line-height: 1; }

.table-container { margin-top: 0; width: 100%; overflow-x: auto; max-height: 350px; border: 1px solid #444; }
.data-table { width: 100%; border-collapse: collapse; background-color: #000; font-size: 12px; color: white; border: 1px solid #333; table-layout: fixed; }
.data-table th, .data-table td { padding: 8px 4px; text-align: center; border: 1px solid #333; }
.data-table th { font-weight: bold; background: #111; color: #fff; position: sticky; top: 0; z-index: 10; }

.highlight-column { background-color: rgba(255, 255, 255, 0.12) !important; }
.value-wrapper { display: inline-block; position: relative; white-space: nowrap; }
.variation-tag { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 4px; font-size: 0.8em; font-weight: bold; }

.fullscreen-module { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 9999; padding: 10px; box-sizing: border-box; }
.module-header { height: 40px; display: flex; justify-content: center; align-items: center; position: relative; margin-bottom: 5px; }
.module-content { height: calc(100% - 45px); display: flex; flex-direction: column; padding: 0 40px; }

.header-controls { position: absolute; right: 10px; display: flex; align-items: center; gap: 10px; }

.btn-close-module, .btn-history { 
    background: rgba(255, 255, 255, 0.1);
    color: white; 
    border: 1px solid #FFFFFF; 
    padding: 5px 15px; 
    cursor: pointer; 
    font-weight: bold; 
    border-radius: 0px; 
    font-size: 12px; 
}
.btn-close-module:hover, .btn-history:hover { background: white; color: #000000; }

.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(50, 50, 50, 0.3); color: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 24px; font-weight: bold; padding: 15px 10px; cursor: pointer; z-index: 10002; transition: all 0.2s ease; border-radius: 4px; }
.nav-arrow:hover { background: rgba(255, 255, 255, 0.2); color: white; border-color: white; }
.nav-prev { left: 10px; } .nav-next { right: 10px; }

.chart-row-60 { flex: 6; position: relative; min-height: 0; margin-bottom: 5px; }
.chart-row-40 { flex: 4; position: relative; min-height: 0; }
.chart-row-30 { flex: 3; position: relative; min-height: 0; }
.border-top { border-top: 1px dashed #333; padding-top: 5px; }

#loading-spinner { display: none; text-align: center; padding: 20px; color: #00FFFF; }

#gallery-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.95); justify-content: center; align-items: center; flex-direction: column; }
#gallery-content { max-width: 95vw; max-height: 85vh; cursor: pointer; }
#gallery-caption { margin-top: 10px; color: #fff; background: rgba(0,0,0,0.6); padding: 5px 15px; border-radius: 20px; }
.gallery-close { position: absolute; top: 15px; right: 25px; color: #fff; font-size: 40px; cursor: pointer; }
.gallery-prev { left: 20px; } .gallery-next { right: 20px; } .gallery-nav { position: absolute; top: 50%; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 30px; cursor: pointer; user-select: none; }

#spread-info-box, #butterfly-info-box {
    position: absolute;
    top: 60px;
    left: 60px;
    width: 230px; 
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #666;
    border-radius: 4px;
    z-index: 10001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: none;
    backdrop-filter: blur(4px);
    overflow: hidden;}

.drag-handle {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 10px;
    cursor: move;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;}

.info-content-body { padding: 10px; font-size: 12px; color: #ccc; line-height: 1.5; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.info-label { font-weight: normal; color: #aaa; }
.info-val { font-weight: bold; color: #fff; }
.info-header-date { text-align: center; border-bottom: 1px solid #444; padding-bottom: 5px; margin-bottom: 5px; color: #fff; font-weight: bold; }
.section-divider { border-top: 1px dashed #444; margin: 6px 0; }

.custom-dropdown-menu { border: none; background-color: #111; max-height: 250px; overflow-y: auto; z-index: 10005; box-shadow: 0 -4px 10px rgba(0,0,0,0.5); }
.custom-dropdown-item { color: white; padding: 8px 12px; cursor: pointer; font-family: Arial, sans-serif; font-size: 13px; border-bottom: 1px solid #222; }
.custom-dropdown-item:hover { background-color: rgba(255, 255, 255, 0.15); }

.info-btn-container { position: fixed; bottom: 32%; right: 92%; z-index: 10000; }
.info-btn { width: 27px; height: 27px; font-size: 12px; background-color: #00008B; border: 1px solid yellow; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: yellow; font-weight: bold; font-style: italic; cursor: pointer; }
.info-tooltip { position: absolute; bottom: 5px; left: 100%; margin-left: 12px; background: rgba(0,0,0,0.9); border: 1px solid #444; color: #fff; padding: 10px; border-radius: 4px; display: none; width: 250px; font-family: Arial, sans-serif; font-size: 13px; }
.info-tooltip::after { content: ''; position: absolute; top: -10px; bottom: -10px; left: -15px; width: 15px; }
.info-btn-container:hover .info-tooltip { display: block; }
.info-tooltip a { color: #00FFFF; text-decoration: underline; }