#globe-container {
    width: 100%;
    height: 85vh;
    min-height: 500px;
    position: relative;
    background: #000000;
    overflow: hidden;
}

#globe-container canvas {
    display: block;
}

#globe-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: #000000;
    z-index: 10;
    transition: opacity 0.5s;
}

#globe-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.globe-loader-text {
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 0.3em;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.globe-loader-dots {
    display: flex;
    gap: 8px;
}

.globe-loader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    animation: globePulse 1.2s ease-in-out infinite;
}

.globe-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.globe-loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes globePulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40%            { opacity: 1;   transform: scale(1);   }
}

.globe-loader-bar-wrap {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
}

.globe-loader-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #00ffff, #0000ff, #8800ff, #ff0000);
    background-size: 200% 100%;
    animation: rainbowBar 2.5s linear forwards, rainbowShift 1.5s linear infinite;
}

@keyframes rainbowBar {
    0%   { width: 0%; }
    100% { width: 100%; }
}

@keyframes rainbowShift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.globe-loader-dots {
    display: flex;
    gap: 8px;
}

.globe-loader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00bcd4;
    animation: globePulse 1.2s ease-in-out infinite;
}

.globe-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.globe-loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes globePulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40%            { opacity: 1;   transform: scale(1);   }
}

.globe-loader-text {
    color: rgba(0, 188, 212, 0.5);
    font-size: 11px;
    letter-spacing: 0.2em;
    font-family: 'Courier New', monospace;
}

#globe-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 188, 212, 0.35);
    font-size: 11px;
    letter-spacing: 0.1em;
    pointer-events: none;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

#dropdown-symbol {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.3s ease;
    display: inline-block;
}

#ranking-widget:hover #dropdown-symbol {
    transform: rotate(180deg);
}

#ranking-widget {
    position: absolute;
    top: 170px;
    left: 16px;
    z-index: 100;
    font-family: 'Poppins', sans-serif;
}

#ranking-toggle-btn {
    font-size: 9px !important;
    background-color: white;
    color: black;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#ranking-panel {
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 300px;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    display: flex;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

#ranking-panel.ranking-panel--open {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 10px 6px;
    border-bottom: 1px solid #eee;
    overflow-y: auto;
    max-height: 150px;
}

.ranking-tab {
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 10px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.ranking-tab:hover {
    background: black;
    color: white;
}

.ranking-tab--active {
    background: black;
    color: white;
}

#ranking-content {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.ranking-list-section {
    margin-bottom: 12px;
}

.ranking-list-title {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Poppins', sans-serif;
}

.ranking-list-title--best { color: #2e9000; }
.ranking-list-title--worst { color: #cc0000; }

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-country-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
}

.ranking-country-row:hover {
    background: #f5f5f5;
}

.ranking-row-rank {
    width: 28px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
    font-size: 11px;
}

.ranking-row-name {
    flex: 1;
    color: black;
    font-weight: 500;
}

.ranking-row-score {
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

@keyframes progress {
    100%{
        width: 90%;
    }
}

.world-map-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    margin-top: 40px;
    position: relative;
}

.world-map{
    width: 75%;
    height: auto;
    margin-left: 12%;
}

svg path{
    cursor: pointer;
}

svg path {
    transition: fill 0.2s ease;
}

svg path:hover{
    fill: #e3fcff !important;
}

.modal.fade.show {
    display: flex;
    justify-content: center;
}

.modal-dialog {
    max-height: 80vh !important;
    max-width: 1400px !important;
    display: flex;
    justify-content: center;
}

.box-modal {
    display: flex;
}

.modal-content{
    width: 1000px !important;
    margin: auto !important;
}

.columns{
    display: flex;
}

.modal-titles {
    width: 300px;
    margin: auto;
    font-size: 13.5px !important;
}

.modal-body{
    padding-right: 0px;
}

.modal-body-data{
    display: block !important;
}

h3, .modal-title{
    font-weight: bold;
    font-size: large;
}

.modal-titles,
.modal-titles-politics {
    width: 300px;
    margin: auto;
    font-size: 13.5px !important;
}

.politics {
    margin-top: 20px;
}

.macroeconomics {
    margin-bottom: 20px;
}

.macroeconomics-data {
    width: 400px;
}

.second-column {
    width: 350px;
    max-width: 350px;
}

.intermodal-shipping-data {
    width: 100%;
}

.politics-data {
    width: 400px;
}

.macroeconomics-data,
.intermodal-shipping-data,
.politics-data,
.demographics-data {
    display: flex;
    margin-top: 5px;
    margin-bottom: 5px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.macroeconomics-data p,
.intermodal-shipping-data p,
.politics-data p,
.demographics-data p {
    padding: 5px;
    margin: 0px;
    border-radius: 7px;
    font-size: 8.5px;
}

.demographics {
    margin-top: 20px;
}

.demographics-data {
    width: 400px;
    display: flex;
    margin-top: 5px;
    margin-bottom: 5px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.demographics-data p {
    padding: 5px;
    margin: 0px;
    border-radius: 7px;
    font-size: 10px;
    background-color: #59c4ff;
}

.macroeconomics-data p{
    background-color: orange;
}

.intermodal-shipping-data p{
    background-color: silver;
}

.politics-data p{
    background-color:#e2bc00;
}

h3{
    margin-top: 0px;
    margin-bottom: 5px;
}

.next{
    margin-top: 0px;
    padding-bottom: 0px;
}

.scores {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 15px !important;
}

.average-score, .weighted-score {
    width: fit-content;
    margin: auto;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: small;
    color: black;
    background-color: red;
}

.graph-title {
    margin: 15px 0px 0px 0px;
    padding: 0px;
    font-size: 15px;
}

.graph-method-description {
    font-size: 8px;
    text-align: center;
    margin: 20px 20px 10px 20px;
    flex-wrap: wrap;
}

.country-link{
    background-color: #FFBD59;
    color: black;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 735px;
}

.economic-complexity-spectrum {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    align-items: center;
}

.economic-complexity-spectrum li {
    font-family: 'Poppins', sans-serif;
    font-size: 8px !important;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    color: rgb(0, 0, 0);
    width: fit-content;
    letter-spacing: 0.02em;
}


#one, #two, #three, #four, #five, #six, #seven, #eight, #nine, #ten{
    font-size: x-small;
    text-align: center;
    padding: 4px 5px;
    margin: 0 5px;
    border-radius: 12px;
}

.modal-footer {
    justify-content: flex-start;
}

#one{ background-color: #ff0000; }
#two{ background-color: #ef3800; }
#three{ background-color: #df7100; }
#four{ background-color: #cf7200; }
#five{ background-color: #e2bc00; }
#six{ background-color: #e2e200; }
#seven{ background-color: #ccdf00; }
#eight{ background-color: #a7c900; }
#nine{ background-color: #80b400; }
#ten{ background-color: #719f00; }

h4{
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
    color: white;
}

.spectrum-overlay {
    position: absolute;
    bottom: 40px;
    right: 20px;
    z-index: 50;
    padding: 0;
    width: 260px;
    pointer-events: none;
    text-align: right;
    background: none;
    border: none;
}

.spectrum-overlay h4 {
    text-align: right;
    font-size: 11px;
    margin: 0 0 8px 0;
    color: rgba(255,255,255,0.85);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.spectrum-description {
    font-size: 9px;
    text-align: center;
    color: rgba(255,255,255,0.45);
    margin: 8px 0 0 0;
    width: 100%;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
    background: none;
}

.country-summary-text {
    margin-top: 10px;
    padding: 0 20px;
    text-align: center;
    margin-right: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.graph-method-description {
    margin-left: 20px;
    margin-right: 50px;
}

.score-tooltip-wrap {
    position: relative;
    display: inline;
}

.score-qmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    background: #888;
    color: #fff;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    cursor: default;
    vertical-align: super;
    margin-left: 3px;
    line-height: 1;
    position: relative;
    top: -2px;
}

.score-qmark:hover + .score-tooltip,
.score-tooltip-wrap:hover .score-tooltip {
    display: block;
}

.score-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    color: #f0f0f0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 13px;
    border-radius: 6px;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
    pointer-events: none;
    text-align: left;
    white-space: normal;
}

.score-tooltip strong {
    color: #fff;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media(max-width: 1460px){
    .world-map{ width: 80%; }
}

@media(max-width: 1300px){
    .world-map{ width: 90%; }
}

@media(max-width: 1195px){
    .world-map{ width: 95%; }
}

@media(max-width: 1100px){
    .world-map{ width: 100%; }
}

@media(max-width: 1025px){
    .close {
        margin-left: 0px !important;
    }

    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .modal-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: auto !important;
    }

    .box-modal{
        flex-direction: column;
    }

    .modal-header {
        text-align: center;
    }

    .modal-body {
        flex-direction: column;
        width: 100%;
        padding: 15px;
    }

    .macroeconomics,
    .second-column,
    .intermodal-shipping,
    .politics,
    .demographics {
        width: 100% !important;
    }

    .second-column {
        max-width: 100% !important;
    }

    .modal-titles,
    .modal-titles-politics {
        width: 100%;
    }

    .macroeconomics-data,
    .intermodal-shipping-data,
    .politics-data,
    .demographics-data {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap;
    }

    .graph {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .porter-five-forces {
        width: 100%;
        overflow-x: auto;
    }

    .porter-five-forces:empty {
        display: none;
    }

    .g-box{
        transform: translate(130px, 60px);
    }

    .porter-five-forces svg {
        width: 700px;
        height: 330px !important;
    }

    .modal-footer{
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .graph-method-description {
        margin-left: 20px !important;
        margin-right: 20px !important;
        text-wrap: wrap !important;
    }

    .country-link {
        margin-right: 0px !important;
    }

    .scores {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        margin-right: 0;
    }

    .country-summary-text {
        margin-right: 0;
        padding: 0 10px;
    }
}

@media(min-width: 750px){
    .scores {
        margin-top: 25px;
    }
}

@media(max-width: 730px){
    #ranking-toggle-btn {
        display: none !important;
    }
}

@media(max-width: 950px){
    .world-map{ width: 115%; }
}

@media(max-width: 900px){
    #one, #two, #three, #four, #five, #six, #seven, #eight, #nine, #ten{
        margin-top: 10px;
    }
}

@media(max-width: 893px){
    .world-map{ width: 125%; }
}

@media(max-width: 845px){
    .world-map{ width: 135%; }
    h4{ font-size: 15px; }
}

@media(max-width: 795px){
    .world-map{ width: 145%; }
}

@media(max-width: 751px){
    .world-map{ width: 155%; }

    .g-box{
        transform: translate(95px, 60px);
    }

    .porter-five-forces svg {
        height: 330px;
    }
}

@media(max-width: 711px){
    .world-map{ width: 165%; }
}

@media(max-width: 679px){
    .world-map{ width: 175%; }
}

@media(max-width: 650px){
    .world-map{ width: 185%; }

    h4{ font-size: 14px; }

    .g-box{
        transform: translate(35px, 60px);
    }

    .modal-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px auto !important;
    }

    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .modal-title, #countryModalLabel {
        font-size: 16px;
    }

    .modal-titles,
    .modal-titles-politics {
        font-size: 13px;
    }

    .macroeconomics-data p,
    .intermodal-shipping-data p,
    .politics-data p,
    .demographics-data p {
        font-size: 9px;
        padding: 4px;
    }

    .graph-title {
        font-size: 12px;
    }

    .country-summary-text {
        font-size: 11px;
        padding: 0 5px;
    }

    .graph-method-description {
        font-size: 7px;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
}

@media(max-width: 621px){
    .world-map{ width: 195%; }
}

@media(max-width: 575px){
    .world-map{ width: 205%; }
}

@media(max-width: 535px){
    .world-map{ width: 215%; }
}

@media(max-width: 515px){
    .world-map{ width: 220%; }
}

@media(max-width: 500px){
    .world-map{ width: 225%; }
}

@media(max-width: 480px){
    .modal-dialog {
        width: 98vw !important;
        max-width: 98vw !important;
        margin: 5px auto !important;
    }

    .modal-content {
        width: 98vw !important;
        max-width: 98vw !important;
    }

    .modal-title, #countryModalLabel {
        font-size: 14px;
    }

    .modal-titles,
    .modal-titles-politics {
        font-size: 11px;
    }

    .macroeconomics-data p,
    .intermodal-shipping-data p,
    .politics-data p,
    .demographics-data p {
        font-size: 8px;
        padding: 3px;
    }

    .graph-title {
        font-size: 10px;
    }

    .country-summary-text {
        font-size: 10px;
    }

    .average-score, .weighted-score {
        font-size: 10px;
        padding: 4px 6px;
    }
}

@media(max-width: 472px){
    .country-link{ margin-right: 45%; }
}

@media(max-width: 465px){
    .world-map{ width: 350%; }
}

@media(max-width: 433px){
    .country-link{ margin-right: 40%; }
}

@media(max-width: 420px){
    .world-map{ width: 400%; }
}

@media(max-width: 415px){
    .world-map{ width: 420%; }
}

@media(max-width: 400px){
    .country-link{ margin-right: 35%; }
}

@media(max-width: 395px){
    .world-map{ width: 450%; }
}

@media(max-width: 374px){
    .world-map{ width: 500%; }
    .country-link{ margin-right: 32%; }
}

@media(max-width: 358px){
    .country-link{ margin-right: 25%; }
}

@media(max-width: 355px){
    .world-map{ width: 550%; }
}

@media(max-width: 342px){
    .world-map{ width: 600%; }
}

@media(max-width: 329px){
    .country-link{ margin-right: 15%; }
}