* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.pintar-page {
    font-family: 'Quicksand', sans-serif;
    background-color: #e7f6c3;
    min-height: 100vh;
    overflow-x: hidden;
}

.pintar-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}


.top-left-branding {
    position: absolute;
    top: 30px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.logo-small {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
}

.page-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 32px;
    color: #000;
    margin: 0;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.top-right-actions {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 10;
    display: flex;
    gap: 12px;
}

.history-button,
.action-button {
    padding: 12px 28px;
    background: linear-gradient(135deg, #e7f6c3 0%, #d6f2da 100%);
    border: 3px solid #82C91E;
    border-radius: 14px;
    font-family: 'Quicksand', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #2d5016;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.history-button:hover,
.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(130, 201, 30, 0.3);
    background: linear-gradient(135deg, #d6f2da 0%, #c5e8b7 100%);
    border-color: #4CAF50;
}

.history-button:active,
.action-button:active {
    transform: translateY(-1px);
}

.pintar-content {
    flex: 1;
    padding: 100px 60px 120px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.pintar-area {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    justify-items: center;
}


.color-palette {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
    align-items: center;
}

.paint-mode-selector {
    display: flex;
    gap: 8px;
    background: white;
    padding: 6px;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.mode-btn {
    width: 45px;
    height: 45px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.mode-btn:hover {
    background: #f0f0f0;
    color: #000;
}

.mode-btn.active {
    background: #82C91E;
    color: white;
    border-color: #4CAF50;
}

.color-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-btn {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 3px solid #000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.color-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" stroke="black" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.3s ease;
}

.color-btn.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

.color-btn.active {
    transform: scale(1.1);
    border-width: 4px;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.4);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    border: 3px solid #80BB9D;
}

/* Botão Borracha no Canto do Canvas */
.eraser-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 12px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.eraser-btn:hover {
    background: #fff5f5;
    border-color: #ff6b6b;
    transform: scale(1.05);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.eraser-btn.active {
    background: #ffebee;
    border-color: #ff6b6b;
    border-width: 3px;
    box-shadow: 0px 4px 10px rgba(255, 107, 107, 0.3);
}

.eraser-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.canvas-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#flower-canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    max-width: 500px;
    max-height: 600px;
}

#flower-canvas.brush-mode {
    cursor: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"%3E%3Ccircle cx="12" cy="12" r="10" fill="none" stroke="%23333" stroke-width="2"/%3E%3Ccircle cx="12" cy="12" r="6" fill="rgba(100,100,100,0.3)"/%3E%3C/svg%3E') 12 12, crosshair;
}

#flower-canvas.fill-mode {
    cursor: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"%3E%3Ccircle cx="12" cy="12" r="10" fill="none" stroke="%23333" stroke-width="2"/%3E%3Ccircle cx="12" cy="12" r="6" fill="rgba(100,100,100,0.3)"/%3E%3C/svg%3E') 12 12, crosshair;
}

#flower-canvas.erase-mode {
    cursor: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"%3E%3Ccircle cx="12" cy="12" r="10" fill="none" stroke="%23333" stroke-width="2"/%3E%3Ccircle cx="12" cy="12" r="6" fill="rgba(100,100,100,0.3)"/%3E%3C/svg%3E') 12 12, crosshair;
}

.flower-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.flower-type-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.flower-type-btn:hover img {
    filter: grayscale(0);
}

.flower-type-btn.active img {
    filter: grayscale(0) brightness(1.1);
}

/* Seção Direita */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 320px;
}

/* Nome da Flor */
.name-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.name-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #000;
    text-align: center;
}

.name-input {
    width: 100%;
    padding: 12px 18px;
    border: 3px solid #80BB9D;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 17px;
    font-weight: 500;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0px 4px 8px rgba(76, 175, 80, 0.2);
}

.name-input::placeholder {
    color: #999;
    font-weight: 400;
}


.flower-type-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.type-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #000;
    text-align: center;
}

.flower-types {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.flower-type-btn {
    width: 90px;
    height: 108px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.12);
}

.flower-type-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.2);
    border-color: #80BB9D;
}

.flower-type-btn.active {
    border-color: #4CAF50;
    border-width: 4px;
    background: #f0fff0;
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(76, 175, 80, 0.3);
}

.flower-type-btn svg {
    width: 100%;
    height: 100%;
}


.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #82C91E 0%, #4CAF50 100%);
    border: none;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.send-button:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #94D82D 0%, #5BC05F 100%);
}

.send-button:active {
    transform: translateY(-1px);
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
}

/* Grama */
.grass-background {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 140px;
    line-height: 0;
    pointer-events: none;
}

.grass {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

/* Footer Copyright */
.footer-copyright {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(45, 80, 22, 0.7);
    z-index: 100;
    pointer-events: none;
}

.footer-copyright.light {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsividade */
@media screen and (min-width: 769px) and (max-width: 1200px) {
    .top-left-branding {
        top: 20px;
        left: 25px;
    }
    
    .logo-small {
        width: 50px;
        height: 50px;
    }
    
    .page-subtitle {
        font-size: 24px;
    }
    
    .pintar-content {
        padding: 90px 15px 100px;
        max-width: 1050px;
    }
    
    .pintar-area {
        gap: 5px;
        max-width: 100%;
        justify-items: stretch;
    }
    
    .color-palette {
        gap: 12px;
        justify-self: center;
    }
    
    .canvas-wrapper {
        max-width: 420px;
        padding: 15px;
        justify-self: center;
    }
    
    .eraser-btn {
        width: 48px;
        height: 48px;
        top: 12px;
        right: 12px;
        padding: 8px;
    }
    
    #flower-canvas {
        width: 100%;
        height: auto;
    }
    
    .color-btn {
        width: 58px;
        height: 58px;
    }
    
    .mode-btn {
        width: 48px;
        height: 48px;
    }
    
    .paint-mode-selector {
        padding: 7px;
    }
    
    .right-section {
        max-width: 300px;
        gap: 20px;
        justify-self: center;
    }
    
    .name-section {
        gap: 8px;
    }
    
    .name-label {
        font-size: 19px;
    }
    
    .name-input {
        padding: 12px 16px;
        font-size: 17px;
        border-radius: 14px;
    }
    
    .flower-type-section {
        gap: 10px;
    }
    
    .type-label {
        font-size: 18px;
    }
    
    .flower-types {
        gap: 10px;
    }
    
    .flower-type-btn {
        width: 88px;
        height: 106px;
        padding: 8px;
        border-radius: 14px;
    }
    
    .send-button {
        padding: 16px 22px;
        font-size: 18px;
        gap: 10px;
        border-radius: 14px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .top-left-branding {
        top: 20px;
        left: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .logo-small {
        width: 45px;
        height: 45px;
    }
    
    .page-subtitle {
        font-size: 22px;
    }
    
    .pintar-content {
        padding: 120px 20px 180px;
    }
    
    .pintar-area {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .color-palette {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .paint-mode-selector {
        margin-bottom: 10px;
    }
    
    .color-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .canvas-wrapper {
        max-width: 100%;
        padding: 20px;
    }
    
    .eraser-btn {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    
    .color-btn {
        width: 50px;
        height: 50px;
    }
    
    .right-section {
        max-width: 100%;
        width: 100%;
    }
    
    .name-label,
    .type-label {
        font-size: 18px;
    }
    
    .flower-type-btn {
        width: 80px;
        height: 96px;
    }
    
    .send-button {
        font-size: 18px;
        padding: 15px 20px;
    }
}