/* ===========================
   Pixel Pro - Estilo Vintage Escuro (RESPONSIVO)
   =========================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* Corpo e tema */
body {
    background-color: #1b1b1b;
    color: #f5f0e6;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Cabeçalho */
.site-header {
    background: linear-gradient(135deg, #2b2b2b, #1f1f1f);
    border-bottom: 4px solid #4a3f35;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 1.8em; /* proporcional ao tamanho da fonte do título */
    width: auto;   /* mantém proporção da imagem */
}

.site-header h1 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: #d4b483;
    letter-spacing: 1px;
}

/* Layout principal */
.main-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 84px);
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Canvas responsivo */
.canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
    border-radius: 8px;
    padding: 12px;
    overflow: auto;
}

.canvas-wrap canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Sidebar */
.sidebar {
    flex-shrink: 0;
    background-color: #262626;
    border-left: 3px solid #4a3f35;
    width: 250px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Botões */
button,
.btn {
    background: linear-gradient(135deg, #3b2f2f, #5a4634);
    color: #f5f0e6;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.12s ease-in-out;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
}

button:active,
.btn:active {
    animation: pulse 0.12s ease-in-out;
}

/* Botão de importar arquivo */
.import-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.import-btn input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Inputs e selects */
select,
input[type="number"],
input[type="text"],
input[type="color"] {
    background-color: #1f1f1f;
    color: #f5f0e6;
    border: 2px solid #4a3f35;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    appearance: none;
}

select:focus,
input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #d4b483;
    box-shadow: 0 0 6px rgba(212,180,131,0.28);
}

/* Estilo para o seletor de fundo e campo de nome */
#bg-color {
    border: 2px solid #4a3f35;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    padding: 0;
}

#proj-name {
    border: 2px solid #4a3f35;
    border-radius: 6px;
    padding: 6px 8px;
    background-color: #1f1f1f;
    color: #f5f0e6;
    font-size: 0.9rem;
}

/* Rodapé */
footer {
    background: #2b2b2b;
    border-top: 4px solid #4a3f35;
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #a89f91;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1f1f1f;
}
::-webkit-scrollbar-thumb {
    background: #4a3f35;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6a5644;
}

/* Responsivo */
@media (max-width: 980px) {
    .main-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 3px solid #4a3f35;
    }
}

/* Animação de clique */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

