.canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100vw;
    overflow-x: auto;
}

canvas {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: var(--planted-color);
    border: 2px solid var(--text-color);
    border-radius: 5px;
    image-rendering: pixelated;
}
:root {
    --dirt-color: #5C4033;
    --planted-color: #8D5A3D;
    --ready-color: #D36C2F;
    --menu-bg: #33231F;
    --text-color: #E0E0D8;
    --button-color: #794D3B;
    --button-hover: #9E644D;
    --green: #4CAF50;
    --shadow-color: #1a1a1a;
    --pixel-font: 'Press Start 2P', cursive;
}

body {
    background-color: #1a1a1a;
    color: var(--text-color);
    font-family: var(--pixel-font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 98vh;
    margin: 0;
    flex-direction: column;
    padding: 5px 20px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: var(--menu-bg);
    padding: 10px 20px;
    border: 4px solid var(--text-color);
    border-radius: 10px;
    box-shadow: 10px 10px 0px var(--shadow-color);
    max-width: 90vw;
    width: 800px;
    max-height: 1100px;
    box-sizing: border-box;
}
.site-title, .header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 2em;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.logo-img {
    height: 48px;
    width: auto;
    max-width: 20vw;
}

.header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 5px;
    border-bottom: 2px solid var(--text-color);
    align-items: center;
    box-sizing: border-box;
}

.header-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.settings-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    text-shadow: 2px 2px 0 var(--shadow-color);
    padding: 0;
    line-height: 1;
}

.settings-btn:hover {
    color: #fff;
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

.stats {
    display: flex;
    gap: 20px;
    padding-bottom: 5px;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

canvas {
    background-color: var(--planted-color);
    border: 2px solid var(--text-color);
    border-radius: 5px;
    image-rendering: pixelated;
}

.control-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-top: 10px;
    border-top: 2px solid var(--text-color);
}

.btn {
    font-family: var(--pixel-font);
    font-size: 14px;
    padding: 10px;
    background-color: var(--button-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--shadow-color);
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
    text-align: center;
    user-select: none;
}

.btn:hover {
    background-color: var(--button-hover);
    box-shadow: 2px 2px 0px var(--shadow-color);
    transform: translate(2px, 2px);
}

.btn:disabled {
    background-color: #666;
    color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-warning {
    background-color: #e74c3c;
}

.btn-warning:hover {
    background-color: #c0392b;
}

.status-message {
    margin-top: 10px;
    padding: 10px;
    min-height: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    width: 97%;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background-color: var(--menu-bg);
    padding: 20px;
    border: 4px solid var(--text-color);
    border-radius: 10px;
    box-shadow: 10px 10px 0px var(--shadow-color);
    max-width: 1100px;
    max-height: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.footer {
    margin-top: 20px;
    font-size: 10px;
    text-align: center;
    line-height: 1.5;
}

.site-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #6A4D3A;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

#farm-equipment-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 600px) {
    .game-container {
        width: 100%;
        padding: 5px;
        min-width: 0;
        box-sizing: border-box;
    }
    .header {
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-width: 0;
    }
    .site-title, .header h1 {
        font-size: 1.1em;
        gap: 5px;
        width: 100%;
        text-align: center;
    }
    .logo-img, .header h1 img {
        height: 32px;
        max-width: 30vw;
    }
    .stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }
    .canvas-wrapper {
        padding: 0;
    }
    canvas {
        height: auto !important;
        aspect-ratio: 1 / 1;
    }
    .control-panel {
        grid-template-columns: 1fr;
    }
    .btn {
        font-size: 12px;
        padding: 8px;
    }
    .footer {
        font-size: 9px;
        padding: 5px 0;
    }
}

div.email > span:nth-child(2) {
    display: none;
}

#confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none; /* Hidden by default */
    z-index: 1000; /* Ensure it appears above other elements */
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}