body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    /* align-items: center; */ /* Removed to allow content to flow vertically */
    min-height: 100vh;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 800px; /* Increased max-width for better content display */
    margin: 20px;
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    margin-bottom: 10px;
}

header h1 a {
    text-decoration: none;
    color: #333;
}

/* Navigation Bar */
nav {
    margin-top: 20px;
    margin-bottom: 30px;
    background-color: #e9ebee;
    padding: 10px 0;
    border-radius: 8px;
}

nav a {
    color: #4a90e2;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #dcdde1;
    border-radius: 5px;
}


/* Main Menu */
.main-menu main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-button {
    display: block;
    background-color: #4a90e2;
    color: white;
    padding: 20px;
    font-size: 20px;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.menu-button:hover {
    background-color: #357abd;
}

/* Game Pages */
.back-button {
    display: inline-block;
    margin-bottom: 20px;
    color: #4a90e2;
    text-decoration: none;
}

textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
}

button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #357abd;
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    min-height: 50px;
}

#result-display {
    font-size: 24px;
    font-weight: bold;
    color: #4a90e2;
}

canvas {
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

#pinball-canvas-container canvas {
    background-color: #222;
}

/* Article List */
.article-list {
    text-align: left;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.article-link {
    display: block;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.3s ease;
}

.article-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-link h3 {
    color: #4a90e2;
    margin-top: 0;
}

.article-link p {
    font-size: 14px;
    color: #666;
}

/* Article Content */
.article-content {
    text-align: left;
    line-height: 1.8;
}

.article-content h2, .article-content h3 {
    color: #4a90e2;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.article-content li {
    margin-bottom: 5px;
}

footer {
    margin-top: 30px;
    color: #999;
    font-size: 14px;
}

footer a {
    color: #999;
    text-decoration: none;
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
}
