/* 전체 레이아웃 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    backdrop-filter: blur(10px);
    max-width: 900px;
    width: 100%;
}

/* 헤더 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.game-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f46e5;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-info {
    display: flex;
    gap: 30px;
}

.score, .level, .lines {
    text-align: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    min-width: 80px;
}

.score span, .level span, .lines span {
    display: block;
}

.score span:first-child, .level span:first-child, .lines span:first-child {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.score span:last-child, .level span:last-child, .lines span:last-child {
    font-size: 1.4rem;
    font-weight: 600;
}

/* 메인 게임 영역 */
.game-main {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.game-area {
    position: relative;
    flex-shrink: 0;
}

#gameBoard {
    border: 4px solid #4f46e5;
    border-radius: 15px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 게임 오버레이 */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* 사이드 패널 */
.side-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.next-piece, .controls, .game-actions {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.next-piece h3, .controls h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 15px;
    text-align: center;
}

#nextPiece {
    display: block;
    margin: 0 auto;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #000;
}

/* 조작법 */
.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.control-item:last-child {
    border-bottom: none;
}

.key {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* 버튼 */
.game-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.game-btn:active {
    transform: translateY(0);
}

.game-actions {
    display: flex;
    gap: 15px;
}

.game-actions .game-btn {
    flex: 1;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 20px;
    }
    
    .game-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .score-info {
        justify-content: center;
        gap: 15px;
    }
    
    #gameBoard {
        width: 250px;
        height: 500px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
        margin: 10px;
    }
    
    #gameBoard {
        width: 200px;
        height: 400px;
    }
    
    .score-info {
        gap: 10px;
    }
    
    .score, .level, .lines {
        padding: 8px 12px;
        min-width: 60px;
    }
}