/* General Reset */


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

html {
    touch-action: manipulation; /* Prevent unwanted zooms and scrolls */
}



body, h1, h2, button, div, main {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pacifico', serif;

}

/*body {
    background: linear-gradient(45deg, #ff6b6b, #f1c40f, #2ecc71, #3498db, #ff6b6b);
    background-size: 300% 300%; 
    animation: borderAnimation 8s linear infinite;
}
*/

body {
    background-image: url("images/wood_bg.jpg");
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
/* Overlay */
#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#overlay-content {
    text-align: center;
    color: white;
}

/* Header */




header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    width: 334px;
    margin: 0 auto;
}

.score-display {
    margin: 0 10px;
    font-size: 20px;
    color: white;
}
#game-board {
    width: 334px;
    height: 495px;
    min-height: 400px;
    max-width: 500px;
    margin: 0 auto;
    background-color: #d8d8d8;
    position: relative;
    border-radius: 10px;
    background-image: url("images/woodbg_light.jpg");
    box-shadow: inset 0.2em 0.2em 0.2em 0 rgba(0,0,0,0.5), 
                inset -0.2em -0.2em 0.2em 0 rgba(255,255,255,0.5);
    overflow: hidden;
    border: solid 1px #41261d;

}


#start-game-button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: #41261d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    background-image: url("images/wood_bg.jpg");
}

#start-game-button:hover {
    background-color: #41261d;
    background-image: url("images/wood_bg.jpg");
}



/* Controls */
#controls {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    width: 336px;
    position: relative;
    margin: 0 auto;
}

#scroll-wheel {
    width: 300px;
    height: 100px;
    background: #555;
    border-radius: 15px;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
    background-image: url("images/woodbg_light.jpg");
    box-shadow: inset 0.2em 0.2em 0.2em 0 rgba(0,0,0,0.5), 
                inset -0.2em -0.2em 0.2em 0 rgba(255,255,255,0.5);
}

#buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#rotate-button, #drop-button {
    height:84px;
    width:84px;
    font-size: 1em;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 10px;
    border: solid 1px #41261d;
}

#rotate-button {
    background: transparent;
    color: #000;
    background-image: url("images/woodbg_light.jpg");
}

#rotate-button:hover {
    background-color: #0056b3;
}

#drop-button {
    background-color: #dc3545;
    color: white;
}

#drop-button:hover {
    background-color: #c82333;
}

.row {
    display: flex;
}

.cell {
    width: 33px;
    height: 33px;
    margin:0px;
    background-repeat: no-repeat;

}

.cell.filled {
}

.cell.current {

}


.cell.I {
    background-color: #f48b59; /* Blue for I */
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;
    background-position: 10% 10%;

}

.cell.O {
    background-color: #e17334; /* Yellow for O */ 
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;
    background-position: 20% 10%;
 
}

.cell.T {
    background-color: #f29a7a; /* Purple for T */  
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;

    background-position: 30% 10%;

}


.cell.S {
    background-color: #e3685b; /* Green for S */ 
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;

    background-position: 40% 10%;


}


.cell.Z {
    background-color: #87b7a0; /* Green for S */  
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;
    background-position: 50% 1%;
 
}

.cell.L {
    background-color: #b9af96; /* Green for S */ 
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;
    background-position: 60% 10%;
}

.cell.J {
    background-color: #cf463d; /* Cyan for J */
    background-image: url("images/wood_bg.jpg");
    box-shadow: 1px 1px 0px #473725,
                2px 2px 0px #473725,
                3px 3px 0px #473725,
                4px 4px 0px #473725;

    background-position: 70% 10%;

}

button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}


.clearing {
    animation: fadeOut 0.5s ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
