:root {
    --bg-color: #202020;
    --text-color: #ffffff;
    /* Updated to match the natural dimensions of way.png */
    --canvas-width: 1024px;
    --canvas-height: 434px;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

header {
    text-align: center;
    margin: 20px 0;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: #ccc;
    margin-top: 5px;
}

#game-container {
    position: relative;
    width: var(--canvas-width);
    height: var(--canvas-height);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    /* Ensure it scales down on smaller screens */
    max-width: 100%;
    /* Remove max-height constraint to flow naturally with content */
    margin-bottom: 40px;
}

.content-section {
    max-width: 800px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.content-section h2, .content-section h3 {
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-top: 30px;
}

.content-section ul {
    list-style-type: disc;
    padding-left: 20px;
}

.content-section li {
    margin-bottom: 10px;
}

footer {
    width: 100%;
    background: #111;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
    color: #fff;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* Ensure aspect ratio is preserved if scaled */
    object-fit: contain;
}

#game-ui {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
    z-index: 10;
}

#game-ui.visible {
    display: block;
}

#game-over-text {
    font-size: 48px; /* Larger text for larger canvas */
    color: var(--text-color);
    margin-bottom: 20px;
    font-family: monospace;
    font-weight: bold;
    text-shadow: 4px 4px 0 #000;
}

#restart-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

#restart-btn::after {
    content: "↻";
    font-size: 60px; /* Larger button */
    color: var(--text-color);
    text-shadow: 4px 4px 0 #000;
}