/* 게임 모달 스타일 */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.game-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.game-modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* 모달 헤더 */
.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
}

.game-icon {
    font-size: 64px;
    margin-bottom: 10px;
    display: block;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.stars {
    color: #ffd700;
    font-size: 18px;
}

.score {
    color: #ffffff;
    font-weight: 600;
}

/* 모달 바디 */
.modal-body {
    padding: 30px;
    color: #e0e0e0;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.game-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.game-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.metric-item {
    font-size: 14px;
    color: #b0b0b0;
}

.game-instructions h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.game-instructions h4 {
    font-size: 16px;
    color: #f0f0f0;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.game-instructions li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.game-instructions li::before {
    content: '🎮';
    position: absolute;
    left: 0;
    top: 8px;
}

.game-instructions p {
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 모달 푸터 */
.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.modal-btn .btn-icon {
    font-size: 16px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.favorite-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-color: transparent;
}

.share-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.play-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.play-btn.primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px 20px 15px;
    }

    .game-title {
        font-size: 24px;
    }

    .game-icon {
        font-size: 48px;
    }

    .modal-body {
        padding: 20px;
        max-height: 50vh;
    }

    .modal-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    .game-stats {
        justify-content: center;
    }

    .game-metrics {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .modal-header {
        padding: 15px 15px 10px;
    }

    .game-title {
        font-size: 20px;
    }

    .game-icon {
        font-size: 40px;
    }

    .modal-body {
        padding: 15px;
    }

    .game-instructions h3 {
        font-size: 18px;
    }
}