* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}
.logo {
    display: block;       /* keskittää kuvan */
    width: 200px;         /* sopiva koko, voi muuttaa */
    height: auto;         /* säilyttää kuvasuhteen */
    margin: 1rem auto 2rem auto;  /* ylä- ja alaväli */
}
@media (max-width: 600px) {
    .logo {
        width: 120px;
    }
}

.topline {
    background-color: #BC002D;
    color: #002F6C;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
    font-size: 0.9rem;   
}
.logo-small {
    height: 40px;     /* pieni logo */
    width: auto;
    display: block;
}
.logo-link {
    display: inline-block;
}
.logo-medium {
    height: 80px;     /* Vaakunat jne... */
    width: auto;
    display: block;
}
.bottomline {
    background-color: #002F6C;
    color: #BC002D;
    padding: 0.75rem 1rem;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
    font-size: 0.9rem;
    text-shadow:
        -1px -1px 0 black,
         1px -1px 0 black,
        -1px  1px 0 black,
         1px  1px 0 black;
}

.content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.content h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.content h2 {
	
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid #ddd;
}

.content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid #ccc;
    font-size: 1.1rem;
    font-weight: 600;
}

.leipateksti {
    padding-left: 1.5rem;
    border-left: 3px solid #ddd;
}
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
}

rt {
    font-size: 0.6em;
    line-height: 1;
}

#game {
    background: #BC002D;
    color: black;
    padding: 20px;
    margin: 50px auto;
    width: 400px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}
button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
}
#result {
    font-weight: bold;
}
#restart {
    display: none;
}
:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #222;
    --border-color: #ddd;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: 
        background-color 0.4s ease,
        color 0.4s ease;
}

.top-header {
    background-color: var(--header-bg);
}

.content h2,
.leipateksti {
    border-left: 3px solid var(--border-color);
}
body.dark {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --border-color: #444;
}
#theme-toggle {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    background: var(--header-bg);
    color: #999999;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.05);
}
a {
    color: #ff5733;
    text-decoration: none;
}
a:visited {
    color: #8844ee;
}
a:hover {
    color: #00ff00;
}
