/* Match-3 Puzzle Game CSS - Cyberpunk Style */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a, #1a0a2e, #0f0f23);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 3px
        );
    pointer-events: none;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

h1 {
    color: #ff00ff;
    text-shadow: 0 0 20px #ff00ff, 0 0 40px #ff00ff;
    font-size: 40px;
    letter-spacing: 5px;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.game-board {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    background: linear-gradient(145deg, #0a0a0a, #1a0a2e);
    padding: 20px;
    border: 2px solid #00ffff;
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5), 0 0 100px rgba(255, 0, 255, 0.3);
}

canvas {
    display: block;
    background: 
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.1), transparent 50%),
        linear-gradient(180deg, #000000, #0a0014);
    border: 2px solid #ff00ff;
    border-radius: 3px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5);
}

#gameCanvas {
    cursor: pointer;
}

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

.next-piece-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border: 1px solid #00ffff;
    border-radius: 3px;
    color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.next-piece-container h3 {
    text-shadow: 0 0 15px #00ffff;
    letter-spacing: 2px;
}

.score-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border: 1px solid #ff00ff;
    border-radius: 3px;
    color: #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    min-width: 200px;
    max-width: 250px;
}

.score-container h3 {
    margin: 5px 0;
    text-shadow: 0 0 15px #ff00ff;
    letter-spacing: 2px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.score-container h3 span {
    font-size: 15px;
    font-weight: bold;
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

button {
    padding: 12px 20px;
    margin: 5px 0;
    border: 2px solid #00ffff;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    width: 100%;
}

#startButton {
    color: #00ffff;
    border-color: #00ffff;
}

#pauseButton {
    color: #ffff00;
    border-color: #ffff00;
}

#hintButton {
    color: #00ff00;
    border-color: #00ff00;
    font-size: 12px;
    padding: 10px 15px;
}

#shuffleButton {
    color: #ff00ff;
    border-color: #ff00ff;
    font-size: 11px;
    padding: 10px 15px;
}

#restartButton {
    color: #ff00ff;
    border-color: #ff00ff;
}

#startButton:hover {
    transform: translateY(-3px);
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    text-shadow: 0 0 10px #00ffff;
}

#pauseButton:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
    text-shadow: 0 0 10px #ffff00;
}

#hintButton:hover {
    transform: translateY(-3px);
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
    text-shadow: 0 0 10px #00ff00;
}

#shuffleButton:hover {
    transform: translateY(-3px);
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
    text-shadow: 0 0 10px #ff00ff;
}

#restartButton:hover {
    transform: translateY(-3px);
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
    text-shadow: 0 0 10px #ff00ff;
}

.instructions {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ffff;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    text-align: center;
}

.instructions p {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin: 10px 0;
    font-size: 16px;
    letter-spacing: 1px;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px;
    border: 2px solid #ff00ff;
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.8);
    display: none;
    z-index: 100;
}

.game-over h2 {
    color: #ff00ff;
    text-shadow: 0 0 20px #ff00ff, 0 0 40px #ff00ff;
    margin-top: 0;
    font-size: 36px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.game-over p {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    font-size: 20px;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 768px) {
    .game-board {
        flex-direction: column;
        align-items: center;
    }
    
    .side-panel {
        width: 100%;
        max-width: 300px;
        margin-top: 20px;
    }
}
