body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 100vh;
    margin: 0;
    background-color: #f4f4f9;
    overflow: auto;
}

.app-container {
    background: white;
    padding: 2rem;
    margin: 0 5vw;  /* Margem lateral fixa */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: fit-content;
    min-width: 100vw;
    min-height: 100vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.grid-wrapper-container {
    overflow: auto;
    max-height: 100vh;  /* Mantém altura limitada */
    width: 100%;  /* Permite crescimento total do grid sem cortar colunas */
}

.grid-container {
    margin-top: 2rem;
    display: grid;
    gap: 1px;
    justify-content: start;  /* Alinha o grid à esquerda */
    border: 1px solid #ddd;
}

/* Mantém rótulos e células quadradas */
.grid-label, .grid-cell, .minecraft-grid-cell {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.grid-label {
    font-weight: bold;
    background-color: #f0f0f0;
}

.pixelated-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid #ddd;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

#pixelCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.dimensions {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.controls button {
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background-color: #5cb85c;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #4cae4c;
}

/* Balão de cor (tooltip) */
.color-tooltip {
    position: absolute;
    display: none;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none; /* Impede que o balão de cor bloqueie outros elementos */
    z-index: 999;
}
