/* 마추기 게임 전용 CSS */

/* 기본 컨테이너 */
.machu-game-container {
    min-height: calc(100vh - 160px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.game-play-container {
    min-height: calc(100vh - 80px); /* footer 제거로 높이 조정 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 20px 80px 20px; /* 하단 여백 80px 추가 */
}

/* 게임 헤더 */
.game-header {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.game-title {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin: 0;
}

/* 시리즈 카드 */
.series-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.series-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.series-card .card-body {
    padding: 1.5rem;
}

.series-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.series-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.series-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.series-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.question-count {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* 게임 설정 화면 */
.game-setup-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 50px auto;
    max-width: 600px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.game-options .btn-group {
    margin-bottom: 20px;
}

.game-options .btn {
    min-width: 100px;
}

/* 게임 플레이 화면 */
.game-play-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 20px auto;
    max-width: 800px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.progress-section {
    background: rgba(108, 117, 125, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

#progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

#score-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007bff;
}

.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 문제 이미지 */
.image-container {
    margin: 0 auto 30px;
    max-width: 400px;
}

.question-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: white;
    padding: 10px;
}

/* 답안 입력 */
.answer-section {
    max-width: 400px;
    margin: 0 auto;
}

#answer-input {
    border-radius: 50px 0 0 50px;
    border: 2px solid #dee2e6;
    font-size: 1.1rem;
    padding: 12px 20px;
}

#answer-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#submit-answer {
    border-radius: 0 50px 50px 0;
    padding: 12px 20px;
    min-width: 60px;
}

#hint-btn {
    border-radius: 20px;
    padding: 8px 16px;
}

/* 결과 표시 */
.answer-result .alert {
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    border: none;
    color: white;
}

/* 게임 결과 화면 */
.game-result-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 50px auto;
    max-width: 600px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.result-score {
    background: rgba(0, 123, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-play-container {
        padding: 15px 15px 100px 15px; /* 모바일에서 더 많은 하단 여백 */
    }
    
    .game-setup-screen,
    .game-play-screen,
    .game-result-screen {
        margin: 10px;
        padding: 20px;
    }
    
    .question-image {
        max-height: 250px;
    }
    
    .image-container {
        margin-bottom: 20px;
    }
    
    .series-card .card-body {
        padding: 1rem;
    }
    
    .series-thumbnail {
        height: 150px;
    }
    
    .game-options .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .game-options .btn {
        min-width: auto;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 에러 및 로딩 상태 */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

/* 힌트 표시 */
.hint-display {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 애니메이션 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

.pulse {
    animation: pulse 0.5s ease-in-out;
}
