:root {
    --mc-grass-top: #5D9346;
    --mc-dirt: #8B5A2B;
    --mc-stone: #787878;
    --mc-sky: #ADD8E6;
    --mc-night: #1A1A2E;
    --mc-text: #333;
    --mc-button-shadow: #3F3F3F;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    background-color: var(--mc-dirt);
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cmVjdCB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIGZpbGw9IiM4QjVBMkIiLz48cmVjdCB4PSIyIiB5PSIyIiB3aWR0aD0iMiIgaGVpZ2h0PSIyIiBmaWxsPSIjNkQ0NjFGIi8+PHJlY3QgeD0iMTAiIHk9IjMwIiB3aWR0aD0iMiIgaGVpZ2h0PSIyIiBmaWxsPSIjNkQ0NjFGIi8+PHJlY3QgeD0iMzAiIHk9IjE1IiB3aWR0aD0iMiIgaGVpZ2h0PSIyIiBmaWxsPSIjNkQ0NjFGIi8+PC9zdmc+');
    /* Simple dirt texture */
    color: white;
    font-size: 1.2rem;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px #000;
}

h1 {
    font-size: 4rem;
    margin: 0;
    color: #FFF;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.5rem;
    color: #DDD;
}

.card {
    background-color: #C6C6C6;
    /* Stone GUI color */
    border: 4px solid #555;
    padding: 15px;
    margin-bottom: 20px;
    color: #222;
    box-shadow: inset 2px 2px 0 #FFF, inset -2px -2px 0 #555;
    position: relative;
    overflow-x: auto;
}

.hidden {
    display: none;
}

/* Minecraft Button Style */
.mc-button {
    background-color: #787878;
    border: 2px solid #000;
    border-top-color: #AAA;
    border-left-color: #AAA;
    color: #FFF;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    width: 100%;
    margin-top: 10px;
    text-shadow: 2px 2px #000;
}

.mc-button:active {
    background-color: #555;
    border-top-color: #000;
    border-left-color: #000;
    border-bottom-color: #AAA;
    border-right-color: #AAA;
    transform: translateY(2px);
    box-shadow: 0 0 0 #000;
}

select {
    width: 100%;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    background-color: #000;
    color: #FFF;
    border: 2px solid #555;
}

#visualization {
    position: relative;
    background-color: var(--mc-sky);
    border: 4px solid #000;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

canvas {
    display: block;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F7FA 100%);
}

.speech-bubble {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    color: black;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid black;
    font-family: 'VT323', monospace;
    max-width: 300px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: black transparent;
    display: block;
    width: 0;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 22px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent;
    display: block;
    width: 0;
    z-index: 1;
}

#solution-text {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #0000AA;
    /* Minecraft Dark Blue */
    white-space: pre-wrap;
    font-family: 'VT323', monospace;
}

.step-block {
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #555;
}

.step-title {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 5px;
    display: block;
}

.formula {
    background: #EEE;
    border: 1px solid #999;
    padding: 2px 5px;
    margin: 2px 0;
    display: inline-block;
    font-family: monospace;
}

#minecraft-explanation {
    font-style: italic;
    color: #333;
    margin-top: 20px;
    border-top: 2px dashed #777;
    padding-top: 10px;
}