
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}


:root {
    --primary-color: #FF0000;
    --bg-color: #f9f9f9;
    --text-color: #333;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #1c1c1c;
    --text-color: #f9f9f9;
    --card-bg: #333;
    --card-shadow: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}


header {
    width: 100%;
    background-color: var(--primary-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

header h1 {
    font-size: 2rem;
    margin-left: 1rem;
}


.toggle-container {
    margin-right: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
    border: 2px solid #fff; 
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
    border: 2px solid #fff; 
}

input:checked + .slider:before {
    transform: translateX(20px);
}


main#visualization-container {
    width: 90%;
    max-width: 1200px;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


.visualization {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
}

.visualization h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.chart {
    height: 400px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9e9e9;
    border-radius: 4px;
}


footer {
    width: 100%;
    padding: 1rem;
    text-align: center;
    color: #fff;
    background-color: var(--primary-color); 
    margin-top: 2rem;
}

#selected-country-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: black;
    text-align: center;
}

#selected-country-name {
    color: var(--primary-color); 
    font-weight: bold;
}

#map {
    width: 100%;
    height: 500px;  
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

svg {
    width: auto;   
    height: auto;  
}
#youtube-link {
    display: inline-block;
    text-decoration: none;
}
#youtube-link .icon {
    width: 50px;
    height: 50px;
}

#reset-selection {
    display: block;
    margin: 1rem auto;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color); 
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#reset-selection:hover {
    background-color: darkred;  
}


#chart-stats-container {
    display: flex;
    gap: 2rem; 
    justify-content: center;
    margin-top: 2rem;
}


#chart-stats-container .visualization {
    flex: 1;
}


#youtuber-stats {
    height: 400px; 
    overflow-y: scroll; 
    overflow-x: auto; 
    border: 1px solid #ccc; 
    margin-top: 1rem;
    position: relative; 
}


.stats-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 0.5rem;
    border: 1px solid #ccc;
    text-align: left;
}

.stats-table th {
    background-color: #FF0000; 
    color: #fff; 
    position: sticky; 
    top: 0;
    z-index: 2;
}

.stats-table tr:nth-child(even) {
    background-color: #f9f9f9; 
}




body.dark-mode .stats-table td {
    color: #fff; 
    background-color: #444; 
}

body.dark-mode .stats-table tr:nth-child(even) {
    background-color: #555; 
}

