:root {
    --bg: #0b1220;
    --text: #e5e7eb;
    --border: #1f2937;
    --sidebar-bg: #111827;
    --accent: #60a5fa;
}

/* ====== Global Reset & Base Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Helvetica,Arial,sans-serif;
    user-select: none;
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====== Header ====== */
.main-header {
    width: 100%;
    padding: 12px 24px;
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    background: var(--sidebar-bg);
}

.main-header a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ====== Main Body ====== */
.main-body {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0;
}

/* ====== Sidebar (Information) ====== */
.sidebar {
    flex: 1;
    min-width: 400px;
    max-width: 400px;
    border-right: 1px solid var(--border);
    background-color: var(--sidebar-bg);
    overflow-y: auto;
    padding: 24px;
}

.top-flag {
    padding-bottom: 40px;
}

.flag {
    width: 120px;
    margin-left: 8px;
    border-radius: 6px;
    float: right;
}

.country-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.country-result {
    font-size: 1.1rem;
    margin-bottom: 5px;
} 

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.label {
    opacity: 0.7;
    font-weight: 600;
}

/* ====== Map Area (replaces chart) ====== */
.chart {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
}

#world-map {
    width: 100%;
    height: 100%;
    touch-action: none;     /* REQUIRED */
    overflow: hidden;
}

.description {
    margin-top: 0px;
    padding-top: 0px;
    border-top: 2px solid #3498db;
}

/*.description p {
    line-height: 1.8;
    color: var(--text);
    text-align: justify;
}*/

.sidebar {
  position: relative;
}

/* Home container */
.home {
  position: absolute;
  top: 24px;       /* matches sidebar padding */
  right: 24px;
}

.navigate-home a {
  text-decoration: none;
  color: #3498db;
  font-weight: 500;
}

/* Home link styling */
/*.home a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  background: #66cbea9f;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.15s ease;
}*/


/* Hover effect */
/*.home a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}*/


/* ====== Responsive Layout: Mobile ====== */
@media (max-width: 750px) {

    .main-body {
        flex-direction: column;
        flex: none;
    }

    .chart {
        width: 100%;
        flex: none;
        height: auto;
        min-height: 200px;
        overflow: visible;
        display: block;
    }

    .sidebar {
        width: 100%;
        flex: none;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        border-right: none;
        border-top: 1px solid var(--border);
    }

    .chart-wrapper {
        height: 70vh;
    }
}

.map-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-controls button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;

  background: var(--border); /*#3b3b3b;*/
  color: #fff;
  font-size: 25px;
  cursor: pointer;

  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}


.map-banner {
    position: absolute;
    opacity: 0;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 800px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background: #146092;
    color: #fff;
    padding: 12px 44px 12px 18px; /* extra right padding for close */
    border-radius: 12px;

    backdrop-filter: blur(6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);

    pointer-events: none; /* allow map interaction */
}

.map-banner-text {
    flex: 1;
    padding: 0 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}

/* Close button */
.map-banner-close {
    pointer-events: auto; /* make button clickable */
    position: absolute;
    right: 10px;

    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 999px;
    width: 28px;
    height: 28px;

    font-size: 18px;
    line-height: 1;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}


.map-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.map-banner-close:hover {
    background: rgba(255,255,255,0.3);
}


/* Container styling */
section {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  max-width: 800px;
  margin: 10px auto;
  padding: 0px;
  line-height: 1.6;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Headings */
h2 {
  color: inherit; /* Deep Navy */
  border-bottom: 1px solid #484d69;
  padding-bottom: 5px;
  margin-top: 0px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

h1 {
  color: inherit; /* Deep Navy */
  border-bottom: 1px solid #484d69;
  padding-bottom: 5px;
  margin-top: 0px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* List styling */
ul {
  list-style-type: none;
  padding: 0;
}

li {
  margin-bottom: 18px;
  padding-left: 15px;
  border-left: 3px solid #3182ce; /* Accent blue */
}

/* Bold text for emphasis */
strong {
  font-weight: 700;
}

/* Horizontal Rule */
hr {
  border: 0;
  height: 1px;
  background: #818181;
  margin: 20px 0;
}

a {
  color: inherit;
  text-decoration: underline;
}

/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #667eead0;
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #5568d3ad;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #667eea80 var(--bg);
}

/* Add bottom fade gradient */
.sidebar::after {
  content: '';
  position: sticky;
  bottom: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg));
}