:root {
    --bg-dark: #000;
    --accent-blue: #00e5ff;
    --accent-green: #00ffaa;
    --accent-pink: #ff00ea;
    --glass: rgba(10, 10, 15, 0.9);
    --glass-border: rgba(0, 229, 255, 0.5);
}

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

body { background-color: var(--bg-dark); color: white; font-family: 'Inter', sans-serif; overflow: hidden; height: 100vh; }
.italic-accent { font-family: 'Playfair Display', serif; font-style: italic; color: var(--accent-blue); }

.layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
.layer.active { pointer-events: auto; }
.hidden { opacity: 0; pointer-events: none; visibility: hidden; }

/* GLOBE */
#globe-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

/* DOTS HUB */
.dot-wrapper { position: absolute; cursor: pointer; transform: translate(-50%, -50%); transition: top 1s, left 1s; padding: 15px; }
.pulse-dot {
    width: 55px; height: 55px; background: var(--accent-green); border-radius: 50%;
    box-shadow: 0 0 40px var(--accent-green), inset 0 0 15px white; animation: pulseDot 1.5s infinite;
}
.pulse-dot:hover { background: var(--accent-pink); box-shadow: 0 0 70px var(--accent-pink); transform: scale(1.3); transition: 0.3s; }
@keyframes pulseDot { 0%, 100% { transform: scale(1); box-shadow: 0 0 25px var(--accent-green); } 50% { transform: scale(1.5); box-shadow: 0 0 60px var(--accent-green); } }

/* DOT DETAILS */
#dot-detail-layer { background: rgba(0,0,0,0.9); display: flex; justify-content: center; align-items: center; }
#detail-content-box { display: flex; width: 95vw; height: 90vh; gap: 4rem; background: var(--glass); padding: 4rem; border-radius: 30px; border: 1px solid var(--glass-border); box-shadow: 0 0 100px rgba(0,229,255,0.2); position: relative; z-index: 101; pointer-events: auto; }
.detail-left { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.detail-right { flex: 1.5; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; width: 100%; }

/* --- THE REAL TABLE --- */
.pro-table { width: 100%; border-collapse: collapse; font-size: 1.2rem; background: rgba(0,0,0,0.5); border-radius: 15px; overflow: hidden; }
.pro-table th, .pro-table td { padding: 1.2rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.pro-table th { background: rgba(0, 229, 255, 0.2); color: var(--accent-blue); font-family: 'Playfair Display', serif; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 2px; }
.pro-table tr { transition: all 0.3s ease; }
.pro-table tbody tr:hover { background: rgba(0, 255, 170, 0.15); transform: scale(1.02); color: var(--accent-green); box-shadow: 0 0 20px rgba(0,255,170,0.2); }

/* --- THE REAL BAR CHART --- */
.pro-chart { width: 100%; height: 400px; display: flex; align-items: flex-end; gap: 15px; border-bottom: 2px solid white; border-left: 2px solid white; padding: 0 20px 0 0; position: relative; margin-top: 50px; }
.pro-chart-y-axis { position: absolute; left: -50px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; font-size: 0.9rem; color: #aaa; padding-bottom: 30px; }
.pro-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; justify-content: flex-end; }
.pro-bar { width: 100%; background: linear-gradient(to top, var(--accent-blue), var(--accent-pink)); border-radius: 5px 5px 0 0; transition: height 2s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; display: flex; justify-content: center; box-shadow: 0 0 20px rgba(0,229,255,0.4); }
.pro-bar-value { position: absolute; top: -30px; font-weight: bold; color: var(--accent-green); opacity: 0; transition: opacity 1s 2s; }
.pro-bar-label { font-size: 0.9rem; color: #fff; text-align: center; }

/* --- POPULATION PYRAMID --- */
.pyramid-container { display: flex; flex-direction: column; width: 100%; height: 100%; gap: 12px; justify-content: center; }
.p-row { display: flex; align-items: center; justify-content: center; width: 100%; gap: 20px; }
.p-age { width: 70px; text-align: center; font-size: 1.2rem; font-weight: bold; color: white; }
.p-male, .p-female { flex: 1; display: flex; align-items: center; }
.p-male { justify-content: flex-end; }
.p-female { justify-content: flex-start; }
.p-bar-m { background: linear-gradient(90deg, var(--accent-blue), #2563eb); height: 35px; border-radius: 10px 0 0 10px; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; box-shadow: 0 0 15px rgba(0,229,255,0.5); }
.p-bar-f { background: linear-gradient(-90deg, var(--accent-pink), #dc2626); height: 35px; border-radius: 0 10px 10px 0; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; box-shadow: 0 0 15px rgba(255,0,234,0.5); }
.p-val-m, .p-val-f { font-size: 1.2rem; color: white; margin: 0 10px; opacity: 0; transition: opacity 0.5s 1.5s; font-weight: bold; }

/* --- THE REAL SCHEME (Flowchart) --- */
.pro-scheme { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.scheme-row { display: flex; gap: 4rem; justify-content: center; width: 100%; }
.s-node { padding: 1.5rem 2.5rem; background: rgba(0,0,0,0.9); border: 2px solid var(--accent-blue); border-radius: 15px; font-weight: bold; font-size: 1.2rem; box-shadow: 0 0 20px rgba(0,229,255,0.5); text-align: center; position: relative; }
.s-center { background: var(--accent-green); color: black; border: none; font-size: 1.5rem; text-transform: uppercase; box-shadow: 0 0 40px var(--accent-green); border-radius: 50px; }
/* Down arrows inside the nodes perfectly centered */
.has-down-arrow::after { content: ''; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); width: 4px; height: 30px; background: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue); z-index: -1; }
.has-down-arrow::before { content: ''; position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 15px solid var(--accent-blue); }


/* FULLSCREEN ZOOM-OUT LAYER */
#fullscreen-img-layer { display: flex; justify-content: center; align-items: center; background: transparent; }
.zoom-out-container { width: 100vw; height: 100vh; transition: all 1.5s cubic-bezier(0.8, 0, 0.2, 1); }
#fs-img-boom { width: 100%; height: 100%; object-fit: cover; }
.zoom-out-container.shrunk { width: 250px; height: 400px; border-radius: 20px; opacity: 0; }

/* 3D FULL CIRCLE CAROUSEL (NOT DRAGGABLE ANYMORE, CONTROLLED BY CLICKS) */
#arc-carousel-layer { perspective: 2000px; display: flex; justify-content: center; align-items: center; background: radial-gradient(circle, #0a0a1a 0%, #000 100%); }
.arc-camera { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; transform-style: preserve-3d; transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.arc-3d { position: absolute; width: 250px; height: 400px; transform-style: preserve-3d; transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.arc-item {
    position: absolute; width: 100%; height: 100%;
    transform: rotateY(var(--rot)) translateZ(600px); /* Form a full circle */
    transition: transform 0.5s;
}
.arc-img-wrapper { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; border: 2px solid var(--glass-border); box-shadow: 0 0 40px rgba(0,0,0,0.8); transition: 0.4s; pointer-events: auto; cursor: pointer; }
.arc-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.arc-item.active-item .arc-img-wrapper { border-color: var(--accent-green); box-shadow: 0 0 60px var(--accent-green); transform: scale(1.1); }

/* ARC DETAIL EXPANDED VIEW */
#arc-detail-layer { background: rgba(0,0,0,0.95); display: flex; justify-content: center; align-items: center; }
.arc-detail-box { width: 95vw; height: 90vh; background: var(--glass); display: flex; border-radius: 30px; border: 1px solid var(--accent-blue); overflow: hidden; box-shadow: 0 0 100px rgba(0,229,255,0.2); pointer-events: auto; z-index: 101; }
.ad-left { flex: 1; padding: 4rem; display: flex; flex-direction: column; justify-content: center; gap: 2rem; border-right: 1px solid var(--glass-border); }
.ad-left h1 { font-size: 4rem; }
.ad-left p { font-size: 2.2rem; line-height: 1.6; }
.ad-right { flex: 1.5; padding: 2rem; display: flex; justify-content: center; align-items: center;}
.ad-right img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; box-shadow: 0 0 50px black; }

/* FULLSCREEN ZOOM-OUT LAYER */

/* 3 INFO SLIDES */
#fake-scroll-layer { background: var(--bg-dark); }
.fs-slide { position: absolute; top: 100vh; left: 0; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; transition: top 1.5s cubic-bezier(0.8, 0, 0.2, 1); }
.fs-slide.active-slide { top: 0; }
.fs-slide.prev-slide { top: -100vh; }
.fs-content { display: flex; gap: 4rem; width: 85%; }
.fs-content img { width: 50%; height: 60vh; object-fit: cover; border-radius: 20px; box-shadow: 0 0 50px rgba(0,229,255,0.3); }
.fs-text { width: 50%; display: flex; flex-direction: column; justify-content: center; gap: 2rem; }
.fs-text h1 { font-size: 4.5rem; }
.fs-text p { font-size: 2.5rem; line-height: 1.6; }

/* OUTRO */
#outro-layer { background: black; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; }
.outro-text { font-size: 6rem; text-shadow: 0 0 50px var(--accent-blue); margin-bottom: 3rem; }
.credits { font-size: 1.5rem; color: #ccc; }

#global-clicker { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; cursor: pointer; }
