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



body {
    font-family: Arial, sans-serif;
    color: #e8f0ff;

    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    transition: background 0.8s ease;
}

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
}

body::before {
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

/* GAME UI */
#board, #keyboard {
    position: relative;
    z-index: 3;
}

/* MODAL (confirm popup) */
.modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

/* WIN SCREEN */
.win {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

/* EUROPE - cool blue */
body.europe {
    background: linear-gradient(-45deg, #0b1320, #1b2a41, #16273d);
}

body.africa {
    background: linear-gradient(-45deg, #2a1a10, #4a2c1a, #5a3a20);
}

body.asia {
    background: linear-gradient(-45deg, #120b1f, #2b1b3f, #3a1f5c);
}

body.north-america {
    background: linear-gradient(-45deg, #071a2d, #0f2f4a, #143a5c);
}

body.south-america {
    background: linear-gradient(-45deg, #0b2a22, #114a3a, #1a5a44);
}

body.oceania {
    background: linear-gradient(-45deg, #06202a, #0d3a4a, #12607a);
}

/* APP CONTAINER */
.container {
    width: 100%;
    max-width: 520px;
    padding: 16px;
    text-align: center;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;
}

/* smaller title now */
.topbar h1 {
    font-size: 22px;
    margin: 0;
}

/* CONTINENT HINT CARD */
.hint {
    margin: 10px 0 18px 0;
    font-size: 16px;
    opacity: 0.9;
}

#continent {
    color: #ffd166;
    font-weight: bold;
}

/* MESSAGE */
#message {
    margin-top: 12px;
    font-size: 18px;
    min-height: 24px;
    color: #a8ffbf;
}

/* BOARD (NO WORDLE GRID FEEL) */
#board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* NEW TILE STYLE (ROUNDED + SOFT) */
.tile {
    width: 44px;
    height: 52px;

    border-radius: 10px;

    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);

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

    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;

    transition: all 0.2s ease;
}

/* COLORS (SOFTER, LESS WORDLE-LIKE) */
.correct {
    background: #2dd4bf;
    border-color: #2dd4bf;
    color: #081c15;
}

.present {
    background: #f4a261;
    border-color: #f4a261;
    color: #1a1a1a;
}

.absent {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.08);
    opacity: 0.5;
}

/* KEYBOARD (MORE MODERN) */
#keyboard {
    margin-top: 18px;
}

.key-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 5px 0;
}

.key {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);

    color: #e8f0ff;

    padding: 10px;
    min-width: 30px;

    border-radius: 8px;

    font-weight: bold;
    cursor: pointer;
}

.key.wide {
    min-width: 70px;
}

/* RESET / MESSAGE AREA */
button {
    font-family: inherit;
}
.new-country-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    border: none;

    color: white;
    font-weight: 600;

    padding: 8px 14px;
    border-radius: 12px;

    cursor: pointer;

    font-size: 13px;

    letter-spacing: 0.5px;

    box-shadow: 0 6px 18px rgba(0, 114, 255, 0.25);

    transition: all 0.2s ease;
}

.new-country-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 114, 255, 0.35);
}

.new-country-btn:active {
    transform: scale(0.97);
}

/* modal */
.modal {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);

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

}

.hidden {
    display: none;
}

.modal-box {
    background: rgba(20, 25, 40, 0.95);
    border: 1px solid rgba(255,255,255,0.1);

    padding: 18px;
    border-radius: 14px;

    text-align: center;

    width: 240px;

    animation: pop 0.2s ease;
}

@keyframes pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-box p {
    margin: 6px 0;
}

/* buttons */
.modal-buttons {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-buttons button {
    flex: 1;

    padding: 8px;

    border: none;
    border-radius: 10px;

    font-weight: bold;
    cursor: pointer;
}

/* YES button */
.modal-buttons button:first-child {
    background: #2dd4bf;
    color: #0b0f1a;
}

/* NO button */
.modal-buttons button:last-child {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* MOBILE */
@media (max-width: 480px) {
    .tile {
        width: 36px;
        height: 46px;
        font-size: 18px;
    }

    .key {
        padding: 8px;
        min-width: 24px;
        font-size: 12px;
    }
}

/* animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: radial-gradient(
        circle at center,
        rgba(0,0,0,0.15),
        rgba(0,0,0,0.55)
    );

    pointer-events: none;
}

/* particles */

#particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;

    animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
    from {
        transform: translateY(100vh);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    to {
        transform: translateY(-10vh);
        opacity: 0;
    }
}

/* win */

.win {
    position: fixed;
    inset: 0;

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

    background: rgba(0,0,0,0.6);

}

.win-box {
    background: #111827;
    padding: 20px;
    border-radius: 12px;
    text-align: center;

    animation: pop 0.3s ease;
}

.win-box button {
    margin-top: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: #2dd4bf;
    cursor: pointer;
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hidden {
    display: none;
}

* {
    box-sizing: border-box;
}