/* Background Animation */
@keyframes slide {
    0% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(25%);
    }
}

/* Background layers */
.bg {
    animation: slide 12s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #2a2a2a 50%, #1a1a1a 50%);
    bottom: 0;
    left: -50%;
    opacity: 0.5;
    position: fixed;
    right: -50%;
    top: 0;
    z-index: -3;
}

.bg2 {
    animation-direction: alternate-reverse;
    animation-duration: 16s;
    background-image: linear-gradient(-60deg, #3a3a3a 50%, #2a2a2a 50%);
}

.bg3 {
    animation-duration: 20s;
    background-image: linear-gradient(-60deg, #4a4a4a 50%, #3a3a3a 50%);
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: #111;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.game-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-box {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.info-box h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #00ffcc;
}

.info-box div {
    font-size: 1.8rem;
    font-weight: bold;
}

.game-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#game-board {
    width: 300px;
    height: 600px;
    background-color: #111;
    border: 3px solid #00ffcc;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

.cell {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1px solid #333;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.next-piece-container {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.next-piece-container h3 {
    margin-bottom: 10px;
    color: #00ffcc;
}

#next-piece {
    width: 120px;
    height: 120px;
    background-color: #111;
    border: 2px solid #555;
    border-radius: 4px;
    position: relative;
    margin: 0 auto;
}

.controls-info {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.controls-info h3 {
    margin-bottom: 10px;
    color: #00ffcc;
    text-align: center;
}

.controls-info p {
    margin: 5px 0;
    font-size: 0.9rem;
}

button {
    background-color: #00ffcc;
    color: #111;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:hover {
    background-color: #00e6b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

button:disabled {
    background-color: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#game-over h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff3366;
}

#game-over p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

/* Tetromino colors */
.cell.type-I { background-color: #00f0f0; }
.cell.type-O { background-color: #f0f000; }
.cell.type-T { background-color: #a000f0; }
.cell.type-S { background-color: #00f000; }
.cell.type-Z { background-color: #f00000; }
.cell.type-J { background-color: #0000f0; }
.cell.type-L { background-color: #f0a000; }

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    #game-board {
        width: 250px;
        height: 500px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
    }
}
