/* setting styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: all 0.4s ease-in-out;
    font-family: "Poppins", sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root{
    --primary-color: #c87fdd;
    --secondary-color: #922eb1;
    --tertiary-color: #e5e5e5;
}

body{
    background-color: rgba(200, 127, 221, 0.1);    
}
/* header */
header{
    text-align: center;
    color: var(--secondary-color);
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    
}

header i{
    align-self: self-end;
}

/* Container */
#pixel-sketch-container{
    padding: 15px;
    display: flex;   
    justify-content: center;     
    gap: 50px;
    flex-wrap: wrap;          
}

/* Setting Panel */
#setting-panel{
    display: inline-block;     
    width: 300px;     
    border: 5px solid rgba(146, 46, 177, 0.5);
    border-radius: 15px;
    overflow: hidden;    
}

#size-control{
    display: flex;
    justify-content: center;        
    flex-direction: column;    
    height: 100%;
}

#size-control > div{    
    display: flex;    
    justify-content: center;
    align-items: center;    
    height: 100%;    
    border: 1px solid rgba(146, 46, 177, 0.3);    
    background-color: rgba(200, 127, 221, 0.2);
}

#setting-panel-hide-btn{
    margin: 0px auto;
    width: 100%;
    border: none;
}

#btn-hide-container{
    padding: 0px;
}

#show-setting-btn{
    transform: scale(0);
    position: absolute;
    top: 0;
    left: 0; 
    width: 100px;        
}

#show-setting-btn:hover{
    opacity: 1;
}

/* Drawing Functionality Control */
#draw-functionality, #other-information{
    flex-direction: column;
}

#draw-controls{
    display: flex;
}


/* Brush Controls */
.active-rainbow-btn{
    background: linear-gradient(to right, 
        #ff9f9f, /* Pastel red */
        #ffcc9f, /* Pastel orange */
        #ffff9f, /* Pastel yellow */
        #9fff9f, /* Pastel green */
        #9f9fff, /* Pastel blue */
        #c9a0ff, /* Pastel indigo */
        #ff9fcd  /* Pastel violet */
    );
    color: #333; /* Dark gray for contrast */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7); /* Soft white shadow */
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
}   

/* brush-control-container */
#brush-control-container, #size-control-container{
    flex-direction:column;    
}

#brush-color-value{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;    
}

#brush-color-value::-webkit-color-swatch{
    border-radius: 50%;    
}

#brush-color-value::-moz-color-swatch{
    border-radius: 50%;    
}

/* size-control-container */
#size-value {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px; /* Track height */
    background: white; /* Track color */
    border-radius: 5px; /* Rounded corners */
    outline: none; /* Remove outline */
    margin: 10px;    
    border-radius: 16px;
  }

  #size-value::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; /* Thumb width */
    height: 20px; /* Thumb height */
    background: white; /* Thumb color */
    border: 3px solid var(--secondary-color);
    border-radius: 50%; /* Circular thumb */
    cursor: pointer; /* Pointer cursor */   

  }

  #size-value::-moz-range-thumb {
    width: 20px; /* Thumb width */
    height: 20px; /* Thumb height */
    background: white; /* Thumb color */
    border: 3px solid var(--secondary-color);
    border-radius: 50%; /* Circular thumb */
    cursor: pointer; /* Pointer cursor */    
  }

  #size-value::-ms-thumb {
    width: 20px; /* Thumb width */
    height: 20px; /* Thumb height */
    background: #922eb1; /* Thumb color */
    border-radius: 50%; /* Circular thumb */
    cursor: pointer; /* Pointer cursor */
  }

  #size-value::-webkit-slider-runnable-track {    
    border-radius: 5px; /* Rounded corners */
  }

  #size-value::-moz-range-track {        
    border-radius: 5px; /* Rounded corners */
  }

  #size-value::-ms-track {       
    border-radius: 5px; /* Rounded corners */
    height: 10px; /* Track height */
    border: none; /* Remove border */
  }

  #size-value::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 10px rgba(146,46,177, .1)
  }
  #size-value:active::-webkit-slider-thumb {
    box-shadow: 0 0 0 13px rgba(146,46,177, .2)
  }
  #size-value:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 13px rgba(146,46,177, .2)
  }

/* Remove Color Controls */
#remove-color-control-container{
    flex-direction: row;
}

.btn, .btn-toggle{
    border: none;
    padding: 5px 20px;
    margin: 5px 15px;
    background-color: white;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;    
}

.btn:hover, .btn-toggle:hover{    
    color: white;
    background-color: var(--primary-color);
    border: 2px solid white;
    text-shadow: 
    -1px -1px 0px rgba(0, 0, 0, 0.3),  
     1px -1px 0px rgba(0, 0, 0, 0.3),
    -1px  1px 0px rgba(0, 0, 0, 0.3),
     1px  1px 0px rgba(0, 0, 0, 0.3);
}

.active-btn, .key-design{
    background-color: var(--primary-color);
    color: white;
    background-color: var(--primary-color);
    border: 2px solid white;
}

.key-design{
    display: inline-block;        
    text-align: center;
    width: 50px;
    margin: 5px;
}

/* Sketch Pad Area */

#sketch-pad{
    border: 2px solid black;
    width: 530px;
    height: 530px;
    display: flex;        
    flex-direction: column;
    
}

.pixel-pad-row{
    display: flex;
    flex: 1;    
}

.pixel-pad{    
    border: 1px dashed rgba(0, 0, 0, 0.1);
    flex: 1;
}

/* keyboard Shortcut Container */
#keyboard-shortcut-container{    
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0);
    transform-origin: top;    
}

#shortcut-overview{
    background-color: var(--secondary-color);
    border: 2px solid white;
    color: white;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
}

.btn-exit{
    position: relative;
    left: 20px;
    bottom: 10px;
    text-align: right;
    height: 25px;
}

.title{
    text-align: center;
    margin-bottom: 10px;
}

/* Responsive Web */

@media (max-width: 768px) { 
    #sketch-pad{
        width: 100%;
    }   
    #view-shortcuts-btn, #draw-controls, #draw-functionality > h4{
        display: none;
    }
}

@media (max-width: 500px) {
    #sketch-pad{
        height: 350px;
    }
}
