:root {
    --primary-color: #795548; /* Minecraft Dirt Brown */
    --secondary-color: #388E3C; /* Minecraft Grass Green */
    --accent-color: #D32F2F; /* Red */
    --light-color: #FFFFFF;
    --dark-color: #212121;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #87CEEB; /* Sky blue */
    image-rendering: pixelated; /* Essential for pixel art feel */
}

canvas {
    display: block;
    touch-action: none; 
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    font-family: 'VT323', monospace;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: auto;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.hidden {
    opacity: 0;
    pointer-events: none;
    display: none; /* simple hide */
}

h1 {
    font-size: 4rem; 
    text-shadow: 4px 4px 0px #000;
    margin-bottom: 20px;
    font-weight: 400; /* Pixel fonts often don't need heavy weight */
    text-align: center;
    padding: 0 20px;
    max-width: 100%;
    box-sizing: border-box;
    color: #fff;
}

/* Optional: Make the highscore list on start screen look good */
.highscore-container {
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border: 4px solid #fff;
    border-radius: 0; /* No rounding */
    margin-bottom: 20px;
    margin-top: 30px; 
    width: 100%; 
    max-width: 340px; 
    box-sizing: border-box;
}
.highscore-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    color: #ffff55; /* Minecraft Yellow */
}
.highscore-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
    max-height: 150px;
    overflow-y: auto;
}
.highscore-container li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    padding: 0 20px;
    max-width: 100%;
    box-sizing: borde0,0,0,0.7);
    border: 4px solid #8f8f8f;
    padding: 16px 18px;
    border-radius: 0;
    width: min(520px, 90%);
    margin-bottom: 18px;
    color: #fff;
}

#settings-panel.hidden {
    display: none;
}

#settings-panel h3 {
    margin: 0 0 6px 0;
    font-size: 2rem;
    color: #fff;
    text-align: center;
}

.settings-hint {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    color: #aaa;
    text-align: center;
}

#words-input {
    width: 100%;
    border-radius: 0;
    border: 4px solid #555;
    background: #000;
    color: #fff;
    padding: 10px 12px;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    resize: vertical;
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.settings-actions button {
    font-size: 1.4rem;
    padding: 10px 18px;
}

#settings-toggle-btn {
    background: #999;
    box-shadow: 0 6px 0 #555;
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: #000;
}

button {
    background-color: #7d7d7d; /* Stone button */
    color: white;
    border: 4px solid #000;
    padding: 15px 40px;
    font-size: 2rem;
    border-radius: 0; /* Minecraft Style */
    cursor: pointer;
    box-shadow: inset -4px -4px 0px rgba(0,0,0,0.5), inset 4px 4px 0px rgba(255,255,255,0.5);
    transition: none; 
    font-weight: normal;
    font-family: 'VT323', monospace;
    margin-top: 10px;
    text-shadow: 2px 2px #000;
}

button:active {
    transform: translateY(4px);
    box-shadow: inset 4px 4px 0px rgba(0,0,0,0.5);
    background-color: #666;
}

button:hover {
    background-color: #8f8f8f;
}

#score-display {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    background: rgba(0,0,0,0.45);
    padding: 10px 20px;
    border-radius: 0;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 4px solid rgba(255, 255, 255, 0.4);
}

.coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: #50C878; /* Emerald Green */
    box-shadow: inset 4px 4px 0 rgba(255,255,255,0.4), inset -4px -4px 0 rgba(0,0,0,0.4);
    border: 2px solid #000;
}

.coin-label {
    font-size: 1.6rem;
    color: #50C878;
}

.coin-fly {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 0;
    rotate: 45deg;
    background: #50C878;
    box-shadow: inset 4px 4px 0 rgba(255,255,255,0.4), inset -4px -4px 0 rgba(0,0,0,0.4);
    border: 2px solid #000;
    transition: left 1.6s ease-in-out, top 1.6s ease-in-out, opacity 1.6s ease-in-out;
    pointer-events: none;
    z-index: 10;
}

.help-bubble {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 4px solid #000;
    color: #b71c1c;
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 22px;
    border-radius: 0;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
    z-index: 20;;
}

.highscore-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    padding: 10px 20px;
    font-size: 1.4rem;
    border-radius: 0;
    border: 2px solid #fff;
    background: #212121;
    color: #fff;
    font-family: 'VT323', monospace;
}

#highscore-list {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 0;
    border: 3px solid #fff

.highscore-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    padding: 10px 20px;
    font-size: 1.2rem;
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
}

#highscore-list {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

#highscore-ul {
    list-style: n7d7d7d;
    box-shadow: inset -4px -4px 0px rgba(0,0,0,0.5), inset 4px 4px 0px rgba(255,255,255,0.5);
    font-size: 1.1rem;
    border: 4px solid #000;
    padding: 10px
    text-align: left;
}

#highscore-ul li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    display: flex;
    justify-content: space-between;
}

#shop-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 16px 0 10px 0;
}

.shop-item {
    background: #ffb347;
    box-shadow: 0 6px 0 #c57a1a;
    font-size: 1.1rem;
}

.shop-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
