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

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 400;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
    flex: 1;
}

.game-area {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#gameCanvas {
    border: 3px solid #4ecdc4;
    border-radius: 10px;
    background: #000;
    display: block;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
}

.overlay-content {
    text-align: center;
    padding: 30px;
}

.overlay-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 200px;
}

.next-piece {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.next-piece h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #4ecdc4;
}

#nextCanvas {
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    background: #000;
}

.score-board {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.score-item:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: 400;
    color: #ccc;
}

.value {
    font-weight: 700;
    color: #4ecdc4;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-start {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

.btn-pause {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.btn-reset {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
}

.btn-primary {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.6);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.instructions {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.instructions h3 {
    margin-bottom: 20px;
    color: #4ecdc4;
    font-size: 1.5rem;
}

.key-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.key-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.key {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid #4ecdc4;
    min-width: 60px;
    text-align: center;
}

.description {
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
    }
    
    .key-controls {
        gap: 15px;
    }
    
    .key-item {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 250px;
        height: 500px;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
    }
    
    .key-controls {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation for score updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-update {
    animation: scoreUpdate 0.3s ease-in-out;
} 
