:root {
    --bg-primary: #ffffff;
    --bg-secondary: #000000;
    
    --text-primary: #ffffff;
    --text-secondary: #72C9FF;
    --text-accent: #72C9FF;
    --text-shadow: rgba(42, 164, 240, 0.4);
    --border-color: #000000;
    --border-color-secondary: #ffffff;
    --button-bg: #72C9FF;
    --button-bg-secondary: #000000;
    --button-text: #ffffff;
    --button-hover: #2AA4F0;
    --button-hover-secondary: #22263f;
    --header-bg: #2AA4F0;
}

body.dark-mode {
    --bg-primary: #000000;
    --bg-secondary: #000000;
    
    --text-primary: #ffffff;
    --text-secondary: #D8263E;
    --text-accent: #D8263E;
    --text-shadow: rgba(147, 28, 44, 0.4);
    --border-color: #ffffff;
    --border-color-secondary: #ffffff;
    --button-bg: #D8263E;
    --button-bg-secondary: #000000;
    --button-text: #000000;
    --button-text-secondary: #ffffff;
    --button-hover: #931C2C;
    --button-hover-secondary: #ADB5DF;
    --header-bg: #D8263E;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: 'VT323', monospace;
    overflow: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.flicker {
    animation: flicker 1s steps(2) infinite;
}

@keyframes flicker {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.continent-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    width: 100%;
    padding: 20px 40px 40px 40px;
    box-sizing: border-box;
    position: relative;
}

.continent img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.continent img.switching {
    opacity: 0.5;
}

.back-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--border-color-secondary);
    padding: 8px;
    cursor: pointer;
    z-index: 100;
    font-family: 'VT323', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    width: 44px;
    height: 44px;
    text-decoration: none;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 2px solid var(--border-color-secondary);
    pointer-events: none;
}

.back-btn:hover {
    background: var(--button-hover);
}

.back-btn:hover::before {
    border-color: #ffffff;
}

.back-btn .material-symbols-sharp {
    font-size: 24px;
    color: var(--text-primary);
}


.continent-title {
    font-family: 'Silkscreen', normal;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 4px;
    text-shadow:
                -2px -2px 0 var(--text-secondary),
                2px -2px 0 var(--text-secondary),
                -2px 2px 0 var(--text-secondary),
                2px 2px 0 var(--text-secondary),
                -2px 0px 0 var(--text-secondary),
                2px 0px 0 var(--text-secondary),
                0px -2px 0 var(--text-secondary),
                0px 2px 0 var(--text-secondary);
    z-index: 10;
    padding-top: 10px;
}

.world-map {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 80px auto 0 auto;
    aspect-ratio: 1769 / 898;
}

.continent {
    position: absolute;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.continent:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 5px var(--text-accent));
}

.continent img {
    width: 100%;
    height: auto;
    display: block;
}

.continent-label {
    font-family: 'VT323', monospace;
    font-size: 12px;
    color: var(--text-primary);
    margin-top: 4px;
    letter-spacing: 1px;
    text-align: center;
    text-shadow:
                -1px -1px 0 var(--text-secondary),
                1px -1px 0 var(--text-secondary),
                -1px 1px 0 var(--text-secondary),
                1px 1px 0 var(--text-secondary);
}

#north-america {
    left: 0%;
    top: 1.34%;
    width: 35%;
}

#south-america {
    left: 19.40%;
    top: 46.76%;
    width: 14%;
}

#europe {
    left: 40.14%;
    top: 2%;
    width: 23%;
    z-index: 5;
}

#asia {
    left: 52.30%;
    top: -2%;
    width: 43%;
}

#africa {
    left: 39.50%;
    top: 39.10%;
    width: 20%;
}

#australia {
    left: 74.80%;
    top: 60.81%;
    width: 18%;
}

.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 70px;
    background: var(--button-bg-secondary);
    color: var(--button-text-secondary);
    border: 2px solid var(--border-color-secondary);
    padding: 8px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    width: 44px;
    height: 44px;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 2px solid var(--border-color-secondary);
    pointer-events: none;
}

.theme-toggle:hover {
    background: var(--button-hover-secondary);
}

.theme-toggle .material-symbols-sharp {
    font-size: 24px;
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .continent-title {
        font-size: 2.5rem;
    }
    
    .world-map {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .continent-container {
        padding: 20px;
    }
    
    .continent-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .world-map {
        max-width: 100%;
    }
    
    .continent-label {
        font-size: 10px;
    }
    
    #asia { width: 40%; left: 35%; }
    #north-america { width: 30%; left: -2%; }
    #europe { width: 20%; left: 22%; }
    #africa { width: 18%; left: 25%; }
    #australia { width: 16%; left: 65%; }
    #south-america { width: 12%; left: 3%; }
}

@media (max-width: 480px) {
    .continent-title {
        font-size: 1.5rem;
    }
    
    .continent-label {
        font-size: 8px;
    }
    
    #asia { width: 35%; left: 32%; }
    #north-america { width: 25%; left: 0%; }
    #europe { width: 18%; left: 20%; }
    #africa { width: 16%; left: 22%; }
    #australia { width: 14%; left: 62%; }
    #south-america { width: 10%; left: 2%; }
}