@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap');

:root {
  --main-gradient: linear-gradient(90deg, #ed7d3a 0%, #ffd447 100%);
  --main-gradient1: linear-gradient(180deg, #ed7d3a 0%, #ffd447 100%);
}

body {
    background-color: #22c1e9;
    color: rgb(0, 0, 0);
    font-family: 'Pixelify Sans', cursive;
    margin: 0;
    padding: 0;
}

button {
    background-color: #363537;
    font-family: 'Pixelify Sans', cursive;
    color: white;
    border: none;
    padding: 10px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: #000000 0px 3px 5px;
}

button.active {
  background-color: #8cd867;
  background-color: #2fbf71;
}

button:hover {
    background-color: #2fbf71;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 #2fbf71;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(47,191,113,0.3);
        transform: scale(1.07);
    }
    100% {
        box-shadow: 0 0 0 0 #2fbf71;
        transform: scale(1);
    }
}

button.pulse {
    animation: pulse 0.4s;
}

nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    background: var(--main-gradient);
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 5px solid #8cd867;
}

nav button {
  font-size: clamp(12px, 2vw, 18px);
  padding: 0.5em 1.2em;
  min-width: 36px;
  min-height: 32px;
  max-width: 120px;
  max-height: 48px;
  transition: font-size 0.2s, padding 0.2s;
}
.import-export {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.import-export .icons svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  display: inline-block;
  vertical-align: middle;
}

.import
{
    background-color: #3b3b3b;
    
}

.export{
    background-color: #9e1e3a;
    
    
    
}
.export:hover {
    background-color: #ef2d56;
}


.canvas-bg{
  
    background-color: transparent;
    background-image: url("./assets/canvas.png");
    background-size: contain;     
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    max-width: 900px;                
    min-height: 200px;
    max-height: 900px;               
    width: 100vw;
    height: 100vh;
}
.canvas-container {
  position: relative;
    background-color: transparent;
    background-image: url("./assets/background.png");
    background-size: cover;     
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: row;
    gap: 290px;
    align-items: center;
    justify-content: center;
    width: 700px;
    height: auto;
    padding: 46px;
}
.canvas-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    
    width: auto;
    box-sizing: border-box;
}

@media (max-width: 1300px) {
    .canvas-controls {
    flex-wrap: wrap;
    justify-content: center;
    width: 100vw;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
}

.canvasstyle {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    
    background-color: #ffffff00;
    border: 5px solid #000000;
}
#canvas {
    background-color: #f0f0f0; 
    
    pointer-events: auto;
    z-index: 3;
}

/* Aggiungi al tuo file CSS */
.frame-wrap {
    cursor: grab;
    transition: all 0.2s ease;
}

.frame-wrap:active {
    cursor: grabbing;
}

.frame-wrap.dragging {
    opacity: 0.5 !important;
    transform: rotate(5deg);
    z-index: 1000;
}

.frame-wrap.drag-over {
    border: 2px dashed #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.05);
}

.frame-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toolbar {
    background: var(--main-gradient1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    gap: 10px;
    border: 5px solid #000000;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867, 0 5px 10px 6px #3b3b3b;
    width: calc(50% - 50px);
    height: auto;
   
    padding: 10px;
    
}



.toolbar font {
    text-shadow: 1px 1px 2px #fff, 0 0 4px #2fbf71;
    
}

.selector{
    width: 30px;
}

.tool-pencil{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.editor {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    
    
}

.frame-canvas {
    
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    border-radius: 10px;
    border: 2px solid #000000;
    background-color: #ffffff;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.animation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 20px;
    border: 5px solid #000000;
    background-image: url("./assets/grass.png");
    background-size: auto;
    background-repeat: repeat;
}

.animation
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    
}

.animation-controls{
   margin: 10px;
   background: var(--main-gradient);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 5px solid #000000;
    border-radius: 20px;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867;
    width: calc(100% - 20px);
    height: 70px; 
}

.frame-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 105px;
    height: 105px;
    border-radius: 10px;
    position: relative;
}

.frame-wrap.active {
    border: 2px solid #2fbf71;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867;
}

.timeline {
    background: var(--main-gradient1);
    display: grid;
    grid-template-columns: repeat(auto-fill, 128px);
    grid-auto-rows: 128px;
    gap: 5px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    border: 5px solid #000000;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867;
    width: calc(100% - 20px);
    max-width: 98vw;           
}

.timeline-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

.frame-number {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 14px;
    font-family: 'Pixelify Sans', cursive;
    color: #222;
    background: rgba(198, 197, 197, 0.7);
    padding: 0 4px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}
.frame-wrap.active {
    width: 105px;
    border: 2px solid #2fbf71;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867;
}




.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, 20px); 
    grid-auto-rows: 20px; 
    gap: 6px;
    background-color: #ffffff;
    border: 5px solid #000000;
    border-radius: 20px;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867;
    width: 154px;
    min-width: none;
    min-height: 25px;
    height: auto;
    max-height: 340px;      
    padding: 10px;
    overflow-y: auto;
    overflow: hidden;
    justify-content: start;
}

.color{
    width: 20px;
    height: 20px;
    border: 2px solid #363537;
    
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: normal;
}
.color:hover {
    border: 2px solid #2fbf71;
    cursor: pointer;
}

.color-picker-wrap {
    width: 113px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

div.pulse {
    animation: pulse 0.4s;
}

.alert {
    color: red;
    text-shadow: 1px 1px 1px #222;
    font-weight: bold;
    font-size: 14px;
    margin-left: 10px;
}

.undo-redo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.icons{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


.selector {
  width: 60px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(237,125,58,0.10), 0 0 0 2px #ed7d3a;
  color: #ebebeb;
  font-size: 18px;
  font-family: 'Pixelify Sans', cursive;
  text-align: center;
  outline: none;
  transition: box-shadow 0.2s, background 0.2s;
  margin: 0 8px;
  backdrop-filter: blur(2px);
}

body.dark-theme .selector {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(237,125,58,0.10), 0 0 0 2px #3aed3a;
  color: #ebebeb;
}

body.light-theme .selector {
  color: #363537;
}

.selector:focus {
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 0 3px #ffd447, 0 2px 8px rgba(237,125,58,0.15);
  color: #ffffff;
}

.delete-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url("./assets/delete-svgrepo-com.svg");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    border: none;
    
    cursor: pointer;
    background-color: transparent;
    transition: filter 0.15s, transform 0.15s;
}


.delete-icon:hover {
    filter: brightness(1.2) drop-shadow(0 0 6px #ef2d56);
    transform: scale(1.15) rotate(-10deg);
}

.delete-frame {
    all: unset;
    display: none;
    width: 30px;
    height: 30px;
    background-image: url("./assets/delete-svgrepo-com.svg");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    border: none;
    
    
    
    cursor: pointer;
    background-color: transparent;
}

.delete-frame:hover {
all: unset;
}

#sky {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    z-index: -1;
    overflow: hidden;       
}

.cloud {
  position: absolute;
  top: 0;
  width: 100px;
  animation: moveCloud linear infinite;
  filter: drop-shadow(6px 8px 5px rgba(0, 0, 0, 0.35));
  z-index: -6666;
  opacity: 0.8;
}
.star {
  position: absolute;
  top: 0;
  width: 100px;
  animation: moveCloud linear infinite;
  filter: drop-shadow(0px 0px 5px rgba(255, 217, 4, 0.897));
  z-index: -6666;
  opacity: 1;
}




@keyframes moveCloud {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-200px);
  }
}


.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-switch .slider {
  width: 36px;
  height: 20px;
  background: #363537;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
  display: inline-block;
}

.toggle-switch .slider:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input[type="checkbox"]:checked + .slider {
  background: #2fbf71;
}

.toggle-switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(16px);
}

.question {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.question button {
    background-color: #363537;
    text-align: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867, 0 5px 10px 6px #3b3b3b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.question button:hover {
    background-color: #2fbf71;
}


body.light-theme {
  background-image: url("./assets/sky.png");
}


body.dark-theme {
  background-image: url("./assets/DarkSky.png");
  --main-gradient: linear-gradient(90deg, #0c906f 50%, #28c888  100%);
  --main-gradient1: linear-gradient(180deg, #0c906f 50%, #28c888  100%);
}

body.light-theme {
  color: #222;
}

body.light-theme #theme-switcher {
  background: #ffd447;

  color: #222;
  border: 2px solid #ffd447;
  transition: background 0.2s, color 0.2s;
}

body.dark-theme .toggle-switch input[type="checkbox"]:checked + .slider  {
  background: #ccff00;
}

body.dark-theme #theme-switcher {
  background: #363537;
  color: #ffd447;
  border: 2px solid #363537;
  transition: background 0.2s, color 0.2s;
}
#theme-switcher {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  margin: 0 10px;
  cursor: pointer;
}

#frame-rate {
  width: 60px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(237,125,58,0.10), 0 0 0 2px #ed7d3a;
  color: #ebebeb;
  font-size: 18px;
  font-family: 'Pixelify Sans', cursive;
  text-align: center;
  outline: none;
  transition: box-shadow 0.2s, background 0.2s;
  margin: 0 8px;
  backdrop-filter: blur(2px);
}

body.dark-theme #frame-rate {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(237,125,58,0.10), 0 0 0 2px #3aed3a;
  color: #ebebeb;
}

body.light-theme #frame-rate {
  color: #363537;
}

#frame-rate:focus {
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 0 3px #ffd447, 0 2px 8px rgba(237,125,58,0.15);
  color: #ffffff;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background: var(--main-gradient);

    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px; 
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.close {
    background: transparent;
    width: 36px;
    height: 36px;
    border: none;
    color: #ef2d56;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffd447;
    float: right;
}



.close:hover,
.close:focus {
    background: #ffd447;
    color: #363537;
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 0 8px #ffd447, 0 0 0 4px #ef2d56;
}

.footer {
    
   
    width: 100%;
    background-color: #363537;
    color: #fff;
    max-height: 20px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    
    font-size: 14px;
}


.export-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-frame {
    all: unset;
    display: none;
    width: 30px;
    height: 30px;
    vertical-align: middle;
    border: none;
    
    cursor: pointer;
    
    background-color: transparent;
    background-image: url("./assets/download-svgrepo-com.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    
}
.download-frame:hover{
    all:unset;
}

.download-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url("./assets/download-svgrepo-com.svg");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    border: none;
    
    
    cursor: pointer;
    background-color: transparent;
    transition: filter 0.15s, transform 0.15s;
}

.download-icon:hover {
    filter: brightness(1.2) drop-shadow(0 0 6px #ffd447);
    transform: scale(1.15) rotate(-10deg);
}

.options-menu {
  position: absolute;
  top: 3px;
  right: 3px;
  left: auto;
  background: linear-gradient(120deg, #ffd447 0%, #2fbf71 100%);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  padding: 0;
  min-width: 40px;
  width: 40px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  z-index: 20;
  overflow: hidden;
  opacity: 0;
  transform: scaleY(0.7);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(.4,1.3,.6,1), transform 0.22s cubic-bezier(.4,1.3,.6,1), visibility 0.22s;
}

.frame-wrap.show-options .options-menu {
  opacity: 1;
  transform: scaleY(1);
  pointer-events: auto;
  visibility: visible;
}

.options-menu .download-frame,
.options-menu .delete-frame {
  display: block !important;
  width: 36px;
  height: 36px;
  margin: 2px auto;
  background: none;
  background-image: none;
  padding: 0;
  border: none;
  box-shadow: none;
  color: #fff;
  text-align: center;
  font-size: 16px;
  border-bottom: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.18s;
  outline: none;
}
.options-menu .download-frame:hover,
.options-menu .delete-frame:hover {
  background: #ef2d56;
  color: #ffd447;
  transform: scale(1.15) rotate(-8deg);
}

.options-button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 21;
  width: 30px;
    height: 30px;
}
.options-button:hover {
  color: #fff;
  background: #444;
}

#export-filename {
  width: 220px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(237,125,58,0.10), 0 0 0 2px #ed7d3a;
  color: #ffffff;
  font-size: 18px;
  font-family: 'Pixelify Sans', cursive;
  outline: none;
  margin: 0 8px;
  transition: box-shadow 0.2s, background 0.2s;
  backdrop-filter: blur(2px);
}

#export-filename:focus {
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 0 3px #ffd447, 0 2px 8px rgba(237,125,58,0.15);
  color: #ffffff;
}
.export-info{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    
}

a {
  color: #2fbf71;           
  text-decoration: underline;
  transition: color 0.2s;
}

a:visited {
  color: #ed7d3a;           
}

a:hover, a:focus {
  color: #ffd447;           
  text-decoration: underline;
}
.gridOptContainers {
  display: flex;
  flex-direction: row;
    align-items: right;
  gap: 50px;
  
}
@media screen and (max-width: 1500px) {
    .toolbar {
        width: calc(70% - 50px);
        
        
        flex-direction: row;
        overflow-x: visible;
        overflow-y: visible;
        overflow: visible;
        padding: 5px;
        gap: 5px;
        
    }

    .toolbar font, .toolbar-title {
        font-size: 1.5rem;
        margin-bottom: 0;
        text-shadow: 1px 1px 2px #fff, 0 0 4px #2fbf71;
    }
    .tool-pencil, .color-picker-wrap {
        flex-direction: column;
        gap: 20px;
    }
    
   

    .color-picker-wrap {
        width: 90px;
        height: 90px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
    }
    .color-palette {
        width: auto;
        min-width: 25px;
        max-width: 600px;
        min-height: 25px;
        padding: 10px;
        overflow-x: visible;
        overflow-y: visible;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
        grid-auto-rows: 20px;
        justify-content: start;
    }
    .canvas-bg {
        
        width: 0;
        max-height: 700px;
        
        background-image: none;
        background-size: cover;
        background-repeat: no-repeat;
    }
    
    

    .editor {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
    }
    .canvas-controls {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        padding: 10px;
    }
    
}


@media screen and (max-width: 900px) {
  #delete-project {
    position: fixed !important;
    left: 16px !important;
    bottom: 16px !important;
    width: 60px !important;
    height: 60px !important;
    z-index: 2000 !important;
  }
}

@media screen and (max-width: 800px) {
    
  .canvas-container {
    
    flex-direction: column;
    background-image: none;
    width: 0;
    height: 0;
    
    }

    .canvas-bg{
        width: calc(100% - 50px);
        
        
    }

    .toolbar {
    background: var(--main-gradient1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    gap: 10px;
    border: 5px solid #000000;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8cd867, 0 5px 10px 6px #3b3b3b;
    width: 300px;
    max-height: 600px;
    padding: 10px;
    
}
    .toolbar font {
    text-shadow: 1px 1px 2px #fff, 0 0 4px #2fbf71;
    
}
    .tool-pencil {
        flex-direction: row;
        gap: 20px;
    }

    

.editor {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        
    }

  .gridOptContainers {
    gap: 10px;
  }

  
}

.frame-wrap .options-button {
  display: none;
}
.frame-wrap:hover .options-button {
  display: block;
}
.frame-wrap.show-options .options-button {
  display: none;
}



.theme{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#delete-project {
  all: unset;
  display: inline-block;
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 80px;
  background-image: url("./assets/delete-svgrepo-com.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  border: none;
  cursor: pointer;
  background-color: transparent;
  transition: filter 0.15s, transform 0.15s;
}

#delete-project:hover {
  filter: brightness(1.2) drop-shadow(0 0 6px #ef2d56);
  transform: scale(1.15) rotate(-10deg);
}

#tutorial-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
#tutorial-highlight {
  
  position: absolute;
  border: 3px solid #ccff00;
  border-radius: 8px;
  box-shadow: 0 0 30px 10px #ccff00;
  pointer-events: none;
  transition: all 0.3s;
}
#tutorial-box {
  position: absolute;
  background: var(--main-gradient);
  color: #222;
  padding: 24px 18px 12px 18px;
  border-radius: 10px;
  max-width: 320px;
  box-shadow: 0 4px 32px #0008;
  z-index: 10000;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
}
#tutorial-controls {
  margin-top: 12px;
  text-align: center;
}
#tutorial-controls button {
  margin-left: 8px;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  
  color: #fff;
  cursor: pointer;
}
#tutorial-controls button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#tutorial-prev {
  background: #28c888;
}

#tutorial-next {
  background: #2fbf71;
}

#tutorial-skip {
  background: #ef2d56;
}

.PP {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #363537;
}

.logo {
  display: flex;
  align-items: center;
    font-size: 32px;
    font-weight: bold;
    color: #000000;
    margin-right: auto;
    margin-bottom: auto;
}

.logo svg text,
.logo svg path {
    animation: paintDrip 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.2s;
    opacity: 0;

}

@keyframes paintDrip {
    0% {
        opacity: 0;
        clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
        filter: 
            saturate(0.2) 
            brightness(0.3)
            
    }
    25% {
        opacity: 0.7;
        clip-path: polygon(0% 0%, 100% 0%, 100% 30%, 0% 25%);
        filter: 
            saturate(0.6) 
            brightness(0.7)
            
    }
    50% {
        opacity: 0.9;
        clip-path: polygon(0% 0%, 100% 0%, 100% 65%, 0% 60%);
        filter: 
            saturate(1) 
            brightness(1)
            
    }
    75% {
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 0% 85%);
        filter: 
            saturate(1.2) 
            brightness(1.1)
            
    }
    100% {
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        filter: 
            saturate(1) 
            brightness(1)
            
    }
}

.color-picker {
    position: relative;
}

.palette-logo {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 27px;
    height: 27px;
    z-index: 10;
    
    /* Stile badge */
    background: #2fbf71;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    
    /* Colore dell'SVG */
    fill: white;
}